[V4RB] Semaphores and subclassing vCursor

Keith DeLong delong at redcort.com
Fri Jul 30 14:50:25 CDT 2004


I'm trying to implement a global semaphore to control thread access to
Valentina. 

It occurred to me that since I use cursors exclusively, I could subclass
Vcursor putting a semphore.signal in the the constructor and a
semphore.release in the destructor.

However MySubclassedVCursor = db.SQLSelect(SQLString...) errors telling me
the db.SQLSelect returns a vCursor.

I'd really like a solution that doesn't require manual adding a signal and
release with each of my hundred or so cursor related methods. Such a
solution seems both ineloquent and fragile as a single omission now or in
the future would cause intermittent errors that could be quite difficult to
track. 

Has anyone else pondered this and/or come up with a solution?

TIA,

Keith DeLong






More information about the Valentina mailing list