Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
Just another Perl shrine

Re^3: Synchronising threads with signals (or not)

by sundialsvc4 (Monsignor)
on Feb 23, 2013 at 14:41 UTC ( #1020310=note: print w/ replies, xml ) Need Help??

in reply to Re^2: Synchronising threads with signals (or not)
in thread Synchronising threads with signals (or not)

Obviously, that was my question, and a very good question it was:   how is a music-recorder thread to be related to a music-player thread?   What are the two processes doing together, such that they need to sychronize?   A recorder certainly is a data-gatherer and a player is a data-consumer, but the two activities don’t particularly sound to me as something that would be synchronized in a producer/consumer relationship.   And that is what has merely triggered idle speculation in both of us.

Subprocesses, such as “user-interface controls player and recorder threads,” are in my experience most-commonly handled with signals to the effect that “your status has changed ... you need to do something differently now ... now wake up, or stop what you’re doing, and go find out what it is.”   Condition variables, on the other hand, are inherently a synchronization mechanism.   Which is why I asked for clarification ... and perhaps also why the OP has now abandoned the question.

Comment on Re^3: Synchronising threads with signals (or not)
Re^4: Synchronising threads with signals (or not)
by BrowserUk (Pope) on Feb 23, 2013 at 14:53 UTC
    How can a queue help you coordinate a music recorder to record a music player?
    Obviously, that was my question,

    What garbage you speak. You were the one that suggested using a queue. You were not questioning its applicability to the OPs problem.

    “user-interface controls

    No one mention "user interface controls". You are just making it up as you go along. As per normal. Pathetic!

    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.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2014-04-20 05:10 GMT
Find Nodes?
    Voting Booth?

    April first is:

    Results (485 votes), past polls