Working with AsyncOperations
-
Hey, I'm working on a .Net library for segmented downloads. I have a Download class and a Segment class. The download class creates a thread for each download, from which threads for each segment are spawned. I've done this walk through[^], but am having troubles implementing the same pattern for my library. I don't know how to work with the userStateToLifetime HybridDictionary with async operations in my case, since in contradiction to the example, there are two 'levels' of tasks in my case (Downloads and Segments). Important to note is that the Download class is set up for ONE download, not multiple. So what should I do, create one HybridDictionary that holds async operations for the segments, create one that holds both the segments and the download, or two; one holding the segments and one holding the download? This is my first real implementation of this pattern, so if you think I'm missing some important understanding of it, please refer me to the relevant documentation :) Cheers
Jeroen De Dauw --- Forums ; Blog ; Wiki --- 70 72 6F 67 72 61 6D 6D 69 6E 67 20 34 20 6C 69 66 65!