Hi All,
I ve written a small program to get started off with pthreads. I somehow feel the program doesnt meet the purpose. Please find the code and the output below. Please find my question at the bottom.
Output
--------
0: Thread1! (printed when i=0)
0: Thread1!
...............
...............
0: Thread1! (printed when i=49)
1: Thread2! (printed when i=0)
1: Thread2!
-----------
-----------
1: Thread2! (printed when i=49)
My question is:
If both the threads are running the output from the functions printThread1 and PrintThread2 should be mingled?
i am in HP-UX 10.20
Same program in cygwin environment yields mingled output.
Please help me with this...
Can anyone explain me how to use pthread_key_create() , pthread_setspecific(), pthread_getspecific() and pthread_key_delete () routines in pthreads.
Kindly state by an example. (3 Replies)
howcome that pthtreads spawn 2 extra processes?
I'm kind of new with pthreads but fork() did not act like this.
Anyone who can give me a technical explanation of what happends with mother / daughter processes?
Best regards Esaia. (2 Replies)
I have created a thread program, it is attached. My problem is that I need to loop this program multiple times, and basically reset everything including the threads created previously. I try to loop the program, the first run is fine, as always, but the second run of the program, the initialize... (0 Replies)
How to give superuser privileges while setting the attributes like pthread_attr_setschedpolicy( )??
Even with normal user mode ,it is working fine for me.But in man pages, they have specied that to set the scheduling policy as SCHED_FIFO, the process should have superuser privileges. (0 Replies)
Hi!
I'm linking my hpux code using -lpthread (gcc), yet it references libpthread_tr.1,
the debug version of the pthread lib. How do I force it to use pthreads?
Thanks, :) (3 Replies)
hi
i have a code:
I found that after exiting from child thread memory isn't freed. I commented everything which is "some actions" here, so thread's function contains only two lines. But it doesn't help.
What do I do wrong?
Thanks a lot (3 Replies)
Hello,
consider a bunch of threads which want to execute a while
loop in parallel but after each iteration of while loop,
we need a synchornization.That is, we have a global
count varibale which is equal to zero at beginig of each iteration
and at the end of each iterartion this variable... (0 Replies)
Situation:
i have multiple pthread_create calls like this:
pthread_create(...., ThreadFunc1,.....);
pthread_create(...., ThreadFunc2,.....);
.
.
which i am using to create multiple threads.All the "ThreadFunc<i>" functions are actually calling same function "Receive" of a class using same... (3 Replies)
Hello,
I am writing a threaded program using the pthread library in linux. I have a master thread that needs to control worker threads, in particular, it has to be able to ensure that none of the worker threads will be running for a specified amount of time, even if the worker threads are... (7 Replies)
Discussion started by: andres625
7 Replies
LEARN ABOUT DEBIAN
jsb-sleek
JSONBOT(1) jsb manual JSONBOT(1)NAME
jsb-sleek - The JSONBOT Sleek (XMPP) program
SYNOPSIS
JSONBOT is a remote event-driven framework for building bots that talk JSON to each other over XMPP. jsb-sleek is the shell XMPP program
using the SleekXMPP library. see http://sleekxmpp.com
DESCRIPTION
jsb-sleek can connect to xmpp servers, join a conference and react on /msg.
USAGE
Usage: jsb-sleek [options]
Options:
--version show program's version number and exit
-h, --help show this help message and exit
-r PATH resume the bot from the folder specified
-d DATADIR, --datadir=DATADIR
datadir of the bot
-u USER, --user=USER JID of the bot
-o OWNER, --owner=OWNER
owner of the bot
-s SERVER, --server=SERVER
server to connect to (irc)
-c CHANNEL, --channel=CHANNEL
channel to join
-l LOGLEVEL, --loglevel=LOGLEVEL
loglevel of the bot
-p PASSWORD, --password=PASSWORD
set password used to connect to the server
--name=NAME bot's name
--port=PORT set port of server to connect to
--save save to config file
-n NICK, --nick=NICK nick of the bot
DOCUMENTATION
See http://jsonbot.org or http://jsonbot.appspot.com/docs for more documentation
SEE ALSO jsb(1), jsb-backup(1), jsb-init(1), jsb-irc(1), jsb-fleet(1), jsb-stop(1), jsb-udp(1), jsb-xmpp(1)AUTHOR
This manual page was written by Bart Thate <bthate@gmail.com>, for the Debian GNU/Linux system (but may be used by others).
Debian GNU/Linux 22 Nov 2011 JSONBOT(1)