01-22-2011
I was looking for testking or stuff like that to simulate the examn questions. :-)
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I'm playing the shell game of moving and deleting files to make room for current DB backup. A set of files gets moved to serverB when serverA threshold is exceeded. I created two scripts one for serverA and one for serverB. Both scripts are run by cron entry. There is a difference of 12 minutes... (4 Replies)
Discussion started by: BigSky
4 Replies
2. What is on Your Mind?
Just thought that I'd announce that today, I passed the aforementioned exam, with flying colours :cool:
In a months time I've got the 102 exam........
It wasn't that difficult really, and I got 100% on two of the subject areas (GNU and UNIX commands - 20 questions and the X Window System - 8... (5 Replies)
Discussion started by: zazzybob
5 Replies
3. Linux
Hello,
Can any one can guide me on LPI examinations about what is the marking scheme & with study guide links.... (1 Reply)
Discussion started by: binny
1 Replies
4. Shell Programming and Scripting
I have a data file that I tail and dump the data into a new file at midnight.
To work I had to use tail -n2 livefile.csv >> storefile.csv. This is ging me 2 or 3 entries at a time into the storefile.csv.
if I continue this then I will have to run a second pass on the file to remove the... (4 Replies)
Discussion started by: Mikey
4 Replies
5. UNIX for Dummies Questions & Answers
Hello guys
I stay all day and i looking the best option to make a exams en Linux .. but i find just one option and very expensive (180 Euro x 5 months + 200 matriculation) and in the lpi homepage is just 260 $ FAQ on Exams / FAQ / Certification / Home - LPI - :confused:
I live in Spain... (3 Replies)
Discussion started by: ___
3 Replies
6. What is on Your Mind?
I want to do a certification on Linux, LPI to be precise. I dont have any idea as to where should one begin. Can any one help me as to where to get the knowledge and certification from ? I would prefer classroom style of teaching and hence want to know of any reputed institue. I do not mind India... (6 Replies)
Discussion started by: IGS77
6 Replies
7. UNIX for Dummies Questions & Answers
hi
i am new in unix.i have installed linux in my pc,but i want to practice and be expatise in hp ux.but i have no hp server for do it.how could i practice hp ux?please help and give suggestion. (1 Reply)
Discussion started by: dipanjan123
1 Replies
8. IP Networking
hi all. and sorry for the random question, but this sparkled a raging flame-war at work and i want more points of view
situation
a router, with linux of some sort,
dhcp client requesting for ip in wan1 (as usual with wan ports)
dhcp server listening in lan1, and assigning ip (as usual... (9 Replies)
Discussion started by: broli
9 Replies
9. What is on Your Mind?
Actually i am from software background and wish to pursue my carrier in linux.
I will clear my linux plus and LPI 1 exam in a week time. wish to ask which certification i should prepare for . my aim is to get a job as a linux administrator.
should i prepare for LPI 2 certification or REDHAD... (0 Replies)
Discussion started by: lobsang
0 Replies
LEARN ABOUT DEBIAN
wx::thread
Wx::Thread(3pm) User Contributed Perl Documentation Wx::Thread(3pm)
NAME
Thread - using wxPerl with threads
SYNOPSIS
# the order of these use()s is important
use threads;
use threads::shared;
use Wx;
my $DONE_EVENT : shared = Wx::NewEventType;
my $worker = threads->create( &work );
# create frames, etc
my $frame = Wx::Frame->new( ... );
EVT_COMMAND( $frame, -1, $DONE_EVENT, &done );
$app->MainLoop;
sub done {
my( $frame, $event ) = @_;
print $event->GetData;
}
sub work {
# ... do stuff, create a shared $result value
my $threvent = new Wx::PlThreadEvent( -1, $DONE_EVENT, $result );
Wx::PostEvent( $frame, $threvent );
}
# event handler
sub OnCreateThread {
# @_ = () is necessary to avoid "Scalars leaked"
my( $self, $event ) = @_; @_ = ();
threads->create( ... );
}
DESCRIPTION
Threaded GUI application are somewhat different from non-GUI threaded applications in that the main thread (which runs the GUI) must never
block. Also, in wxWidgets, no thread other than the main thread can manipulate GUI objects. This leads to a hybrid model where worker
threads must send events to the main thread in order to change the GUI state or signal their termination.
Order of module loading
It's necessary for "use Wx" to happen after <use threads::shared>.
Sending events from worker threads
"Wx::PlThreadEvent" can be used to communicate between worker and GUI threads. The event can carry a shared value between threads.
my $DONE_EVENT : shared = Wx::NewEventType;
sub work {
# ... do some stuff
my $progress = new Wx::PlThreadEvent( -1, $DONE_EVENT, $progress );
Wx::PostEvent( $frame, $progress );
# ... do stuff, create a shared $result value
my $end = new Wx::PlThreadEvent( -1, $DONE_EVENT, $result );
Wx::PostEvent( $frame, $end );
}
The target of the event can be any "Wx::EvtHandler"
Receiving events from worker threads
"Wx::PlThreadEvent" is a command event and can be handled as such. The "->GetData" method can be used to retrieve the shared data
contained inside the event.
my $DONE_EVENT : shared = Wx::NewEventType;
EVT_COMMAND( $frame, -1, $DONE_EVENT, &done );
sub done {
my( $frame, $event ) = @_;
print $event->GetData;
}
Creating new threads
Creating new threads from event handlers works without problems except from a little snag. In order not to trigger a bug in the Perl
interpreter, all event handler that directly or indirectly cause a thread creation must clean @_ before starting the thread.
For example:
sub OnCreateThread {
my( $self, $event ) = @_; @_ = ();
threads->create( ... );
}
failure to do that will cause "scalars leaked" warnings from the Perl interpreter.
perl v5.14.2 2007-03-16 Wx::Thread(3pm)