semaphores do not access like volatile
diegogomezdeck at consultar.com
diegogomezdeck at consultar.com
Mon Feb 10 11:06:06 UTC 2003
Nick,
Are you signaling the semaphore before changing the "results" variable?
Can you atach a piece of code with the problem?
Cheers,
Diego Gomez Deck
> Hello,
>
> I'm doing this: I send my authentication to a server, and then wait on
> a semaphore. A reading process checks for response. if it has
> response, it changes an instance variable (results), and sends signal
> to the semaphore.
>
> Now a funny thing happens: the semaphore releases the first thread, but
> the instance variable didn't change (fast enough). if i add an
> additional delay, everything works fine.
> what id do in java now would be declaring results volatile, but what
> should i do in squeak?
>
> regards,
>
> nick
> - --
> "I'd love to go out with you, but I'm staying home to work on my
> cottage cheese sculpture."
More information about the Squeak-dev
mailing list
|