Platforms to show: All Mac Windows Linux Cross-Platform

/Util/Threads/SetThreadName


Required plugins for this example: MBS Util Plugin

You find this example project in your Plugins Download as a Xojo project file within the examples folder: /Util/Threads/SetThreadName

This example is the version from Mon, 5th May 2019.

Project "SetThreadName.xojo_binary_project"
Class App Inherits Application
Const kEditClear = "&Löschen"
Const kFileQuit = "Beenden"
Const kFileQuitShortcut = ""
EventHandler Sub Open() // you normally don't name the main thread... SetThreadNameMBS "This is my Main Thread" End EventHandler
End Class
Class MainWindow Inherits Window
Control Thread1 Inherits Thread
ControlInstance Thread1 Inherits Thread
EventHandler Sub Run() SetThreadNameMBS "TestThread" do loop End EventHandler
End Control
Control Thread2 Inherits Thread
ControlInstance Thread2 Inherits Thread
EventHandler Sub Run() SetThreadNameMBS "CrashingTestThread" // cause a crash dim p as ptr p.Int16(0) = 0 End EventHandler
End Control
Control PushButton1 Inherits PushButton
ControlInstance PushButton1 Inherits PushButton
EventHandler Sub Action() Thread1.run End EventHandler
End Control
Control PushButton2 Inherits PushButton
ControlInstance PushButton2 Inherits PushButton
EventHandler Sub Action() Thread2.run End EventHandler
End Control
End Class
MenuBar MenuBar1
MenuItem FileMenu = "&Ablage"
MenuItem FileQuit = "#App.kFileQuit"
MenuItem EditMenu = "&Bearbeiten"
MenuItem EditUndo = "&Rückgängig"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "&Ausschneiden"
MenuItem EditCopy = "&Kopieren"
MenuItem EditPaste = "&Einfügen"
MenuItem EditClear = "#App.kEditClear"
MenuItem UntitledMenu0 = "-"
MenuItem EditSelectAll = "&Alles auswählen"
End MenuBar
End Project

The items on this page are in the following plugins: MBS Util Plugin.


The biggest plugin in space...