[Glass] Semaphore error
Dale Henrichs via Glass
glass at lists.gemtalksystems.com
Sat Nov 29 06:18:26 PST 2014
Try using a TransientSemaphore in place of Semaphore. It's designed to be
used in chunks of code that may become persistent ...
Dale
On Sat, Nov 29, 2014 at 5:15 AM, Dario Trussardi via Glass <
glass at lists.gemtalksystems.com> wrote:
> 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
>
> _______________________________________________
> Glass mailing list
> Glass at lists.gemtalksystems.com
> http://lists.gemtalksystems.com/mailman/listinfo/glass
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20141129/47989658/attachment.html>
More information about the Glass
mailing list