Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8188275
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T02:51:10+00:00 2026-06-07T02:51:10+00:00

Static lock As Object SyncLock lock TraverSingweb.TraverSingWeb.WebInvoke(Sub() TraverSingweb.TraverSingWeb.putHtmlIntoWebBrowser(theenchancedwinclient)) ‘This quick function need to finish

  • 0
Static lock As Object

SyncLock lock
    TraverSingweb.TraverSingWeb.WebInvoke(Sub() TraverSingweb.TraverSingWeb.putHtmlIntoWebBrowser(theenchancedwinclient)) 'This quick function need to finish before we continue
End SyncLock

SyncLock lock
    'SuperGlobal.lockMeFirst(AddressOf SuperGlobal.doNothing) ' donothing
End SyncLock

This is how I currently do in vb.net. Is this a pattern?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T02:51:12+00:00Added an answer on June 7, 2026 at 2:51 am

    Here is a really basic example; the main method simply creates two threads and starts them. The first thread waits 10 seconds and then sets the _WaitHandle_FirstThreadDone. The second thread simply waits for the _WaitHandle_FirstThreadDone to be set before continuing. Both threads are started at the same time but the second thread will wait for the first thread to set the _WaitHandle_FirstThreadDone before continuing on.

    See: System.Threading.AutoResetEvent for further details.

    Module Module1
    
        Private _WaitHandle_FirstThreadDone As New System.Threading.AutoResetEvent(False)
    
        Sub Main()
            Console.WriteLine("Main Started")
            Dim t1 As New Threading.Thread(AddressOf Thread1)
            Dim t2 As New Threading.Thread(AddressOf thread2)
            t1.Start()
            t2.Start()
            Console.WriteLine("Main Stopped")
            Console.ReadKey()
        End Sub
    
        Private Sub Thread1()
            Console.WriteLine("Thread1 Started")
            Threading.Thread.Sleep(10000)
            _WaitHandle_FirstThreadDone.Set()
            Console.WriteLine("Thread1 Stopped")
        End Sub
    
        Private Sub thread2()
            Console.WriteLine("Thread2 Started")
            _WaitHandle_FirstThreadDone.WaitOne()
            Console.WriteLine("Thread2 Stopped")
        End Sub
    End Module
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Do I need to declare an static Object and use lock on it like
How come this isn't working? private static object Lock_HandleError = new object(); public static
I am trying to implement Mutex lock on one of my static function of
Consider the following code: public class Foo { private static final Object LOCK =
static Object LockEx=new Object(); public void SaveMyData(IEnumerable<MyData> list) { lock (LockEx) { using (PersistencyContext
i try to put a lock to a static string object to access to
I'm trying to understand why this code is not working. private static object _lock;
What happens when we use the lock object? I am aware that it the
According to MSDN , Monitor.Wait() : Releases the lock on an object and blocks
// Member Variable private static readonly object _syncLock = new object(); // Now inside

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.