Re: RFC 86 (v1) IPC Mailboxes for Threads and Signals
[email protected] (Uri Guttman) Fri, 11 Aug 2000 12:18:54 -0400
| Newsgroups | perl.perl6.language.flow |
|---|---|
| Message-ID | <[email protected].> |
>>>>> "NI" == Nick Ing-Simmons <[email protected]> writes: NI> Uri Guttman <[email protected]> writes: >> i think we do because a thread can block on a mailbox while it can't on >> an array. NI> Why not ? - I see no reason that a "shared" array could not have NI> whatever-it-takes to allow blocking. then every op that could touch an array has to have code to support blocking. i think that would be a mess. and what is the definition of blocking on an array, is it empty? can i pop or shift it? how do you handle atomicity? how do you specify a non-blocking access (poll) on an array? mailboxes are defined to work fine with those requirements. a get on a mailbox will block until one item is retrieved and that is an atoamic operation. a get can be made non-blocking (polling) with a optional argument. uri -- Uri Guttman --------- [email protected] ---------- http://www.sysarch.com SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting The Perl Books Page ----------- http://www.sysarch.com/cgi-bin/perl_books The Best Search Engine on the Net ---------- http://www.northernlight.com