Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: The problem with "The Problem with Threads"

by zentara (Archbishop)
on Jul 18, 2014 at 12:57 UTC ( #1094210=note: print w/replies, xml ) Need Help??


in reply to The problem with "The Problem with Threads"

Use the Fork, Luke, the Fork. :-)

Oh wait, everything on Windows OS is a thread, even the forks. If I had to write a serious program, that could involve crashes or whatever, I would use fork. On Linux, SysV Shared Memory along with a fork, is the best way to go. It just seems to have a cumbersome interface now, it would be nice to have a super-easy SysV shared memory module. I know modules exist, but they are not as easy to use as threads::shared.


I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh
  • Comment on Re: The problem with "The Problem with Threads"

Replies are listed 'Best First'.
Re^2: The problem with "The Problem with Threads"
by BrowserUk (Pope) on Jul 20, 2014 at 06:33 UTC
    Use the Fork, Luke, the Fork. :-)

    Try using a fork -- the metal utensil -- to slice a tomato and see the sticky mess you end up with.

    Like its namesake, fork is useful for somethings and not so for others.

    everything on Windows OS is a thread, even the forks.
    Everything on modern *nix is also a thread. Processes are simply single threaded processes.

    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
      What are you advocating then, in regards to all this? Are you lobbying for forks and threads that don't use clone(), so you get a pure executable space, unencumbered by the parent process's ENV and filehandles? I think that would be the most desirable way to do it, but you would be forced to deal with the filehandles yourself, having to open them all manually. Most people don't expect to have to manually open stdout or stdin.

      I'm not really a human, but I play one on earth.
      Old Perl Programmer Haiku ................... flash japh
        What are you advocating then, in regards to all this? Are you lobbying for forks and threads that don't use clone(), so you get a pure executable space, unencumbered by the parent process's ENV and filehandles? I think that would be the most desirable way to do it, but you would be forced to deal with the filehandles yourself, having to open them all manually. Most people don't expect to have to manually open stdout or stdin.

        Like I said. You shouldn't throw the baby away with the bathwater.

        Instead of all or nothing; how about clone-on-demand.


        With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.
Re^2: The problem with "The Problem with Threads"
by dcmertens (Scribe) on Jul 25, 2014 at 10:47 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1094210]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2019-08-24 09:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?