Public Sub Foo()
Dim sText As String
Dim objLock As Object = New Object()
Try
Monitor.Enter(objLock)
Try
sText = "Hello"
Finally
Monitor.Exit(objLock)
End Try
Catch e As Exception
MessageBox.Show(e.Message)
End Try
End Sub
- DeveloperFusion
Sunday, March 28, 2010
Synclock
"A SyncLock block behaves like a Try...Finally construction in which the Try block acquires an exclusive lock on lockobject and the Finally block releases it. Because of this, the SyncLock block guarantees release of the lock, no matter how you exit the block. This is true even in the case of an unhandled exception." - MSDN
Friday, March 26, 2010
C: Compiling GNU Projects on Windows
I wanted to port the programs I commonly use on Linux to Windows. In particular I have been working on wdiff. A program that compares the differences word by word of two files.
Currently I have been able to successfully compile the program on windows through Cygwin. I also was able to reproduce it on my colleges Redhat server.
The steps I took were:
wget http://ftp.gnu.org/gnu/wdiff/
tar -xzvf wdiff-0.5.tar.gz
cd wdiff-0.5
./configre
make (install) wdiff
However, I would like to run the program natively on Windows similar to the Project: UnixUtils.
I am currently working on a custom port due to the fact that I cannot run ./configure to establish a make file. Suggestions would be greatly appreciated.
Subscribe to:
Posts (Atom)