Vinnie Moscaritolo wrote:

I noticed that I am having a difficult time identifying if and when a
token is removed or added through the muscle interface.. I am sure
> that many others are having the same issue.. yes you can use the
> callback with MSCCallbackForTokenEvent() but this API can cause all
> sorts of threading issues. especially if you try and cancel them
> while they are waiting.

Is there really a bug with the callback API, or is the "bug" that
people have problems doing multi-threaded programming properly?

What's the issue with cancelling callbacks?

It occurred to me that a simple way to identify tokens coming and
> going would simply be to add a field to the MSCTokenInfo structure

Callbacks are much more system and resource friendly, especially
when software is used on a multi-user system (anyone here remember
those :-). Polling is OK when you're on your own dedicated 3GHz
XEON Linux box, but it really sucks the cycles when you're sharing
a server running multiple users.

Multi-threaded programming is more difficult if you're not used to
it, but once you get the hang of it, it's really cool. And, you can
almost always convert a callback/wait mechanism to look like a
polling loop without incuring the overhead of polling.

I'm wary of "fixing" an API because a common method of programming
is "hard". I'd much rather see Dave teach an on-line course in
multu-threaded programming :-).

mike

--
----------------------------------------------------------------------------
  Michael Bender                       E-Mail: [EMAIL PROTECTED]
  Sun Microsystems, Inc.                  Tel: 831-401-9510
  14 Network Circle                       Tel: x.31807
  Menlo Park, Ca. 94025
  Mailstop: UMPK14-260                    MD: VPN/IMAP

Never make assumptions... they are usually wrong.

----------------------------------------------------------------------------

_______________________________________________
Muscle mailing list
[EMAIL PROTECTED]
http://lists.drizzle.com/mailman/listinfo/muscle

Reply via email to