CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
Coordination of one section, 2 proc. with semaphores

 



ramses
New User

Feb 27, 2015, 7:31 AM

Post #1 of 2 (2386 views)
Coordination of one section, 2 proc. with semaphores Can't Post

Hi forum! This is my first post. Since last month Im learing to program with Perl, now is the moment to study the "semaphores" for coordinate the sections.

Section with mutex works like this? (of coruse with declaring the semaphores before)


Code
proc1 { 
$sem0->down();
print("S1\n");
$sem0->up();}



Code
proc2 { 
$sem0->down();
print("S2\n");
$sem0->up();}


it doesnt works for me, who can help me?

Thanks.


(This post was edited by ramses on Feb 27, 2015, 7:32 AM)


FishMonger
Veteran / Moderator

Feb 27, 2015, 7:44 AM

Post #2 of 2 (2381 views)
Re: [ramses] Coordination of one section, 2 proc. with semaphores [In reply to] Can't Post


Quote
it doesnt works for me

That's a very poor problem description and doesn't help us to help you troubleshoot the problem.

What module are you using?

What was your expectations?

How did the script fail to meet your expectations?

What errors and warnings does it produce?

Please post a short but complete script which demonstrates the problem.


(This post was edited by FishMonger on Feb 27, 2015, 7:45 AM)

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives