[Glass] Semaphore error

Dario Trussardi via Glass glass at lists.gemtalksystems.com
Sat Nov 29 05:15:06 PST 2014


Ciao,

	i work with Gemstone 3.1.0.6  environment.

	I need to manage a critical access ( not simultaneous use of the device ) to printer device.

	I define a  printer "data base " with 		accessSema   instance set to:

		^ accessSema ifNil:[ accessSema := Semaphore forMutualExclusion ]


	and a method :		critical: mutuallyExcludedBlock 

						^ self accessSema critical: mutuallyExcludedBlock 
	
	
But when i do the printer command with:

		 aPrinter  critical:[   

	the system answer:
a TransactionError occurred (error 2407), The object Semaphore(316884481) may not be committed, 'instances of its class are non-persistent'

	How i can manage a global critical access to the printer device ?

	Considerations ?

	Thanks,	

		Dario
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20141129/d10d8ab4/attachment.html>


More information about the Glass mailing list