First true multithreading event

From the archive: written in 2009 and kept for the record. Much of it is out of date.

Today I was able to do some work on the .Net Download library project. I mainly focused on the cross thread event handling, on which I’ve been busy for quite a while now. Thanks to some helpful docs on MSDN, I now have a working implementation, that successfully fires events of the Download class onto the thread the instance was created. (yay!) The next step is to clean up the code a little, and implement it for all events. I’m still looking for the best way to store all the event delegates. I originally had a delegate for each event, but now moved them to a HashTable, from where I identify them via an Int32 Enum

.Breakpoint successfully triggered after cross thread fired event

Jeroen De Dauw is founder and CEO of Professional Wiki and builds NeoWiki. More about me. Reply by email or on Mastodon, Bluesky or X.

2 comments on “First true multithreading event”

  1. Nice!

    Why did you not use delegates for cross threat communication?

    Btw, will the new library require .NET 4.0, which allows for anonymous functions?

    Keep up the good work!
    dartrax

  2. Hey,

    I am using delegates, like mentioned in the post 😉

    As for .Net 4.0: good question. To be honest, I haven’t had a good look at it yet. Unless it has some stuff that would really improve the lib, I’m sticking with .Net 2.0, which will allow a lot more people to use it, and will have less deployment issues.

    Cheers!

Comments are closed.