Easy language How to write two threads? A thread loops through the graph. A thread loop button F2.

Source: Internet
Author: User

Easy language How to write two threads?
A thread loops through the graph. A thread loop button F2.
//
. assembly variable parameter, integer type
. assembly variable thread handle 1, Integer type
. assembly variable thread handle 2, Integer type
Start Thread (& subroutine 1, parameter, thread handle 1)
Start Thread (& subroutine 2, thread handle 2)
//
. Subroutine Sub-Program 1
. parameter parameter 1, integer type
Information box (parameter 1, 0,)
Information box ("This is the example of thread 1", 0,)
//
. Subroutine Sub-Program 2
Information box ("This is the example of Thread 2", 0,)
//
//
Attention:
Where calls to COM interface plug-ins, like the desert/Angel plugin,
Must be added in the subroutine to be run
Thread _com initialization.
//
2 Floor: Version 2
. Support Library Ethread. Assembly Window Assembly 1
. assembly variable handle, integer type
. subroutine __ Start Window _ Create finished _ start window. Visual = False
Start Thread (& subroutine 1, thread handle)
' & is a child program pointer.


. Subroutine Sub-Program 1
Information box ("This is a thread example", 0,)
//
3 floor. Open the Multithreaded Support library
. Version 2
. Support Library Ethread boot thread (,,)
Call format: Logical type start thread (
Subroutine pointer to execute sub-program,
[Integer parameter Data],
[integer thread handle])
-Multi-threaded support library-multithreading control
English Name: CreateThread
Creates and starts a thread that can be reused to create multiple threads, returns true successfully, and fails to return false. This command is a primary command.
The name of parameter 1 is "subroutine to execute", and the type is subroutine pointer (subptr). This parameter provides the subroutine to start when the thread is created, and depending on whether the parameter data needs to be passed, the subroutine must have no or an integer parameter, or an error will occur.
The name of parameter 2 is parameter data, and the type is integer (int), which can be omitted. This parameter provides the integer data that is passed to the child program to start when the thread is started.
If this parameter is not omitted, the subroutine must receive an integer parameter at this point, otherwise an error will occur.
The name of the parameter 3 is "thread handle", and the Type is "integer (int)", which can be omitted, providing only variables when supplying parameter data. If this argument is supplied, the parameter variable is written to the line Cheng (under Windows Handle,linux is pthread_t), and the handle is closed at the appropriate time.
If you do not supply this parameter to the receive thread handle, the thread handle is automatically processed internally.
.
Operating system requirements: Windows, Linux

Easy language How to write two threads? A thread loops through the graph. A thread loop button F2.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.