Welcome to Pauls PureProject
 Home Online Reference Guide duplicated from http://cvs.purebasic.com  
 Online Resources
   · Reference

 Libraries
     2DDrawing
     Billboard
     Camera
     CDAudio
     Cipher
     Clipboard
     Console
     Database
     Date
     Desktop
     Engine3D
     Entity
     File
     FileSystem
     Font
     Gadget
     Help
     Image
     ImagePlugin
     Joystick
     Keyboard
     Library
     Light
     LinkedList
     Material
     Math
     Memory
     Menu
     Mesh
     Misc
     Module
     Mouse
     Movie
     Network
     OnError
     Packer
     Palette
     Particle
     Preference
     Printer
     Requester
     Sort
     Sound
     SoundPlugin
     Sprite
     Sprite3D
     StatusBar
     String
     SysTray
     Terrain
     Texture
     Thread
     Toolbar
     Window

 PauseThread

Syntax

PauseThread(ThreadID)
Description
Pauses the execution of the specified thread, previously created with CreateThread(). The thread can be resumed with ResumeThread().

Parameters:
ThreadID - The ID number of the thread you want to pause. This value is returned by CreateThread().


Return value:
This command does not return a value.


Example:
Procedure PrintStuff(dummy.l)
    For i.w=0 To 10
        Print(".")
        Delay(200)
    Next
EndProcedure

If OpenConsole()
    DefType.l thid
    thid.l = CreateThread(@PrintStuff(), @thid)
    If thid
        Delay(100)
        PauseThread(thid)
        For i.w=0 To 10
            Print("A")
            Delay(50)
        Next
        
        ; Resume thread and give it enough time to complete
        ResumeThread(thid)
        Delay(3000)
    EndIf
    
    CloseConsole()
EndIf
End

Supported OS

Windows, Linux

<- KillThread() - Thread Index - ResumeThread() ->



Hosted by Reel Media Productions Copyright©2001-2004 All Rights Reserved