Do lightweight processes work?
Carl Stehle
carl at aurora.com
Thu May 31 03:31:26 AEST 1990
In article <8134 at brazos.Rice.edu> feldman at comet.Tymnet.COM (Steve Feldman) writes:
>
>We're considering writing some code using Sun's lightweight process
>(-llwp) and non-blocking I/O (-lnbio) libraries. Are there any known
>problems we should watch out for?
LWP's worked out quite well for us, but watch out for the following:
1. Sun states that the Standard I/O library is non-reentrant for lwp's,
(man lwp_sleep) so you will either need to isolate its use to one lwp at a
time or use monitors.
2. I was unable to get dbx to work with -lnbio, but I don't know who's bug
that is :-)
3. I assume that you are using cc and not gcc, as the latter handles
structure parameters different than cc. (Yes, structures are passed in
some lwp calls, sigh).
4. SELF appears to work only for the initial lwp and not others.
You wisely choose -lnbio, as the entire lwp "pod" would be blocked by an
I/O call by any of the lwp's.
-Carl
More information about the Comp.sys.sun
mailing list