| 261 | | ####################################################################### |
| 262 | | Below here still the more or less unorganized stuff |
| 263 | | |
| 264 | | CORE::GLOBAL::exit; # kills all the threads |
| 265 | | |
| 266 | | # We intentionally do not list cross-machine parallelism Conc:: classes here. |
| 267 | | # Consult your local 6PAN mirror with a time machine. |
| 268 | | use Conc::Processes; # fork() or createProcess based implementation |
| 269 | | use Conc::Threads; # maybe it just exports &async to override the default one, yay |
| 270 | | use Conc::Multiplex; # this is default |
| 271 | | |
| 272 | | my $thr = async { |
| 273 | | ...do something... |
| 274 | | END { } |
| 275 | | }; |
| 276 | | |
| 277 | | Conc::Thread.this |
| 278 | | Conc::Proc.this |
| | 261 | =head2 Threads |
| | 262 | |
| | 263 | |
| | 264 | =head3 Kill all |
| | 265 | |
| | 266 | CORE::GLOBAL::exit; # kills all the threads |
| | 267 | |
| | 268 | |
| | 269 | =head3 Thread models |
| | 270 | |
| | 271 | We intentionally do not list cross-machine parallelism Conc:: classes here. |
| | 272 | Consult your local 6PAN mirror with a time machine. |
| | 273 | |
| | 274 | use Conc::Processes; # fork() or createProcess based implementation |
| | 275 | use Conc::Threads; # maybe it just exports &async to override the default one, yay |
| | 276 | use Conc::Multiplex; # this is default |
| | 277 | |
| | 278 | my $thr = async { |
| | 279 | ...do something... |
| | 280 | END { } |
| | 281 | }; |
| | 282 | |
| | 283 | Conc::Thread.this |
| | 284 | Conc::Proc.this |
| | 285 | |
| | 286 | =head3 Thread methods and attributes |
| 281 | | - numify to TIDs (as in pugs) |
| 282 | | - stringify to something sensible (eg. "<Conc:tid=5>"); |
| 283 | | - enumerable with Conc.list |
| 284 | | - Conc.yield (if this is to live but deprecated, maybe call it sleep(0)?) |
| 285 | | - sleep() always respects other threads, thank you very much |
| 286 | | - standard methods: |
| | 289 | |
| | 290 | - numify to TIDs (as in pugs) |
| | 291 | - stringify to something sensible (eg. "<Conc:tid=5>"); |
| | 292 | - enumerable with Conc.list |
| | 293 | - Conc.yield (if this is to live but deprecated, maybe call it sleep(0)?) |
| | 294 | - sleep() always respects other threads, thank you very much |
| | 295 | - standard methods: |