mark%umcp-cs@udel-relay@sri-unix.UUCP (08/07/83)
From: Mark Weiser <mark%umcp-cs@udel-relay> From: Dave Mankins <dm@bbn-unix> What I really need are concurrent programming techniques in C. Has anyone out there designed, implemented, thought about, or read about doing concurrent programming in C? Anyone ever implemented co-routines in C? Multiplexed files do what you want, but they do not supply true co-routines because some process must be the master. 4.2bsd with sockets and stuff can (probably) do the same thing. Icon, which has great stuff for co-routining (I have just been reading the manual), is available free for a tape from icon-request@arizona.
dm%bbn-unix@sri-unix.UUCP (08/10/83)
From: Dave Mankins <dm@bbn-unix> Hello, world. I have an application, written in C, in which I would like to multi-process a single process. Basically, I have an object manager which receives requests from users, and which may send out sub-requests to other managers in order to process the request. Between sending the sub-request and getting the reply the manager is basically idle, even though there may be many user requests pending. One simple solution to this problem is to fork a copy of the object manager for every user-request that comes in, so I can afford to wait for the replies. Processes are cheap in UNIX, but they aren't that cheap. What I really need are concurrent programming techniques in C. Has anyone out there designed, implemented, thought about, or read about doing concurrent programming in C? Anyone ever implemented co-routines in C? Thanks, Dave Mankins ARPA: dm@bbn-unix USENET: ...ucbvax!dm@bbn-unix (I think)
arnold@gatech.UUCP (08/12/83)
This is probably going to generate a lot of "He's got to be kidding!" and other flames, but here goes: Couldn't you achieve co-routines through *VERY* careful use of longjmp and setjmp? It would not be easy to code, but would probably work well enough. -- Arnold Robbins Arnold @ GATech (CS Net) Arnold.GATech @ UDel-Relay (ARPA) ...!{sb1, allegra}!gatech!arnold (uucp) ...!decvax!cornell!allegra!gatech!arnold
laura@utcsstat.UUCP (08/13/83)
Coroutines in C have already been done. See cr(VII) in the 6th Edition UNIX Programmer's Manual. laura creighton utzoo!utcsstat!laura