Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: AS 5.8 + PDK + threads + ActiveX

by pg (Canon)
on Nov 23, 2002 at 20:01 UTC ( [id://215417]=note: print w/replies, xml ) Need Help??


in reply to AS 5.8 + PDK + threads + ActiveX

Everything seems just normal to me. Couple of points:

  • Your code is not complete. You have three subs, but you never called InitIO, and Shutdown IO. (It is fine with main_loop, if you call InitIO, it will then call main_loop). I assume that's just copy/paste type problem. So I changed your exit statement to:
    InitIO(); ShutdownIO(); exit;
  • You said, the print "Exiting ..." never being printed. That is quite normal. When you called exit, you exit the process not the thread, so your main_loop sub, which is running on a detached thread, just being suddenly stoped before it was evaluated to its end. exit always stop the process, not the calling thread, doesn't matter whether the calling thread is the main thread, or a created thread.
  • You have a detached thread, and you didn't try anything to sync your threads, so don't expect any sync'd behavior among your threads.
  • If you want sync among threads, play with join, cond_wait, cond_signal, cond_broadcast.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (1)
As of 2024-04-23 16:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found