semaphores do not access like volatile
niko.schwarz at gmx.net
Mon Feb 10 10:38:16 UTC 2003
-----BEGIN PGP SIGNED MESSAGE-----
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?
"I'd love to go out with you, but I'm staying home to work on my
cottage cheese sculpture."
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
-----END PGP SIGNATURE-----
More information about the Squeak-dev