how to define code block synchronous

  • Thread starter Thread starter Mike
  • Start date Start date
M

Mike

Hi,

I am trying to use the Monitor::Wait() function from C++. I get an
exception saying "Object synchronization method was called from an
unsynchronized block of code." So my question is simply: how do I
synchronize a block of code?

Best regards,
Michael Powell
 
Mike said:
Hi,

I am trying to use the Monitor::Wait() function from C++. I get an
exception saying "Object synchronization method was called from an
unsynchronized block of code." So my question is simply: how do I
synchronize a block of code?

You have to call Monitor::Enter() and Monitor::Exit() yourself around your
synchronized block of code.

-cd
 
Back
Top