Home > database >  Multithreading issues
Multithreading issues

Time:10-12

PB haven't study, because past projects need so recently make multi-threaded, wrote a simple demo test, but an error, don't understand, don't know where is their wrong, the great god teach
@ WorldMobile @ a passer-by the cw

 
SharedObjectRegister (" uo_thread ", "ExpThreadInstance")
SharedObjectGet (" ExpThreadInstance thread_one)

Thread_one. Uf_setparent (parent)
Thread_one. Post uf_event ()


An error as shown in figure,


The corresponding uo_thread class code is as follows, is nonvisualobject
 forward 
Global type uo_thread from nonvisualobject
End type
End forward

Global type uo_thread from nonvisualobject
End type
Global uo_thread uo_thread

The type variables
The window w_agu
End the variables

Forward as
Public subroutine uf_setparent (window w_get)
Public subroutine uf_event ()
End as

Public subroutine uf_setparent (window w_get); W_agu=w_get
End subroutine

Public subroutine uf_event (); W_agu. Triggerevent (" ue_event ")
End subroutine

On uo_thread. The create
Call super: : create
TriggerEvent (this, "constructor")
End on

On uo_thread. Destroy
TriggerEvent (this, "destructor")
Call super: : destroy
End on


Have not been able to implement multithreaded effect, a great god taught, or give me a train of thought, can write a simple demo of the better

CodePudding user response:

Multi-threaded many problems under the PB, if compiled to PBD can also make do with, compiled into a single exe, program exits, and haven't really quit, to wait for a while, system exit program to recycle

CodePudding user response:

reference 1st floor lvxinzhi response:
multi-threaded many problems under the PB, if compiled to PBD can also make do with, compiled into a single exe, program exits, and haven't really quit, have to wait a while, the system will go to recycle exit program

Compiled into PBD or DLL can be, the key is now I haven't done multithreaded simple demo yet

CodePudding user response:

To a great god help ah

CodePudding user response:

ah... No one, really is

CodePudding user response:

I also want to know how can realize, under the cap for you

CodePudding user response:

The Internet search a lot

CodePudding user response:

Feeling of PB timer events also pretty good,

CodePudding user response:

refer to the eighth floor r00_a2lBUR response:
feel PB timer events also pretty good,

The timer works also can't instead of thread

CodePudding user response:

refer to 6th floor lvxinzhi response:
search on the net a lot

In the search on the net post, or post not achieve them, just want to beg group of great god
But in a recent study road great god PFW, to see the agent in the PFW thread class library is how to realize the
  • Related