Re: stackless language features
"Mark Hahn" <[email protected]>
| Newsgroups | gmane.comp.lang.prothon.user |
|---|---|
| Message-ID | <[email protected]> |
Lenard Lindstrom wrote: > thread <name> (arg, ...): > <body> I like this for replacing the OS thread statement and specifying the new soft threads. I hated the params argument in the old OS hard thread constructor. I'm not sure how we can specify what type of thread we are making though. Maybe we can have two different keywords. > In this case thread just replaces the gen keyword. Cool idea. You've accomplished what you said you wanted to do about merging gen and threads. I will give some thought to see if there is any problem with such a simple idea. How about an OSThread (osThread?) keyword and a thread keyword. It would be weird to have a camelcase keyword but I cannot think of any other. I've been thinking lately about the name for the gate (my old name) aka channel (Christian's name). Christian pointed out the ideal-meaning but impractical name rendezvous. I would like to suggest "coupler" since this is an object that maintains a queue of threads waiting for a mate to be coupled with and then it pairs them off. You can thank my wife for this obscene idea. :-) I think the coupler should just be constructed with a normal call_ and init_. Any fine-tuning of the scheduling would be done by setting attributes of the coupler.