After a quick skim of the abstract confusions, enter the tangible! The fact that perl's ithreads have created a bunch of little pseudo-processes out of the threads! I'm not sure I'm convinced how forward-thinking it is to model processes by using threads. "Real" (OS-level) Processes already must explicitly share data. Processes have private data. Processes run their own interpreter. Process run in parallel. Why reinvent the wheel?
Add in the escher-esque quality of starting an OS process to run perl, which creates a main OS/kernel thread... now perl's ithreads creates more OS/kernel threads which in turn act like separate perl processes. ithreads have their own interpreter, they share data through complex operations akin to IPC which means they are as fast as processes sharing data. This seems more like going backwards than forwards.
Yes, indeed! You're spot on here. This is exactly what ithreads are and it's what perlthrtut means when it says:
In this model, each thread runs in its own Perl interpreter, and any data sharing between threads must be explicit. The user-level interface for ithreads uses the threads class.
That line tells us everything we need to know and it's why I quoted it in my above post. You've just elucidated what the documentation has said in that line in a much clearer and more explicit way.
"its own Perl interpreter" -- That tells us it's not really a thread, but a separate process as a real thread isn't a complete copy with its own interpreter but a unit of execution inside a process that shares address space with other unique units of execution.
"data sharing between threads must be explicit" -- And finally this tells us that they don't share address space and if you want shared data you must do it by some other means just as you would between any other 2 separate processes. Ie the standard way with ithreads is using the complex operations as you put it, ie IPC.
Also, again, please don't respond to me Browser. This response is not aimed at you, but for Juster and the general community. I've heard all you've had to say on the matter and I respectfully disagree, so please refrain from attacks on me.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.