Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 686 Vote(s) - 3.58 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Multi Thread

#1
Greetings CM members, Today I'm gonna show you how to easily multi-thread your applications to prevent annoying crashing.

Step 1 :
Make a new Console Application and Import threading into the project
PHP Code:
Imports System.Threading 
Step 2:
Declare a new thread to handle a sub/function, I will be using a simple tick/counter
Sub Main Load:
PHP Code:
Dim T1 As New Thread(Sub() Example())
T1.Start() 
Counter Class:
PHP Code:
Sub Example()
        For 
0 To 10
            Threading
.Thread.Sleep(1000)
            
Console.WriteLine(i)
        
Next
    End Sub 

And thats it! If you have a line which uses a + or * or / symbol than use this:
PHP Code:
Me.Invoke(DirectCast(Sub() 0MethodInvoker)) 
Or else a you will get a threading error.

Enjoy
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through