| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
1 | Type | AsyncReaderWriterLock | Mutex + async | AwaitableCriticalSection | ||
2 | Link | https://nitoasyncex.codeplex.com/wikipage?title=AsyncReaderWriterLock | http://stackoverflow.com/questions/23582262/async-reader-writer-locker | http://qedcode.com/content/awaitable-critical-section | ||
3 | ||||||
4 | ||||||
5 | IsAsync | Yes | Yes and no. | Yes | ||
6 | ||||||
7 | Usage: | http://pastebin.com/3XpaZYE1 | http://pastebin.com/4XLn38A3 | http://pastebin.com/QC2BE6Xu | ||
8 | http://pastebin.com/Kxvk2Ckd | |||||
9 | Output | |||||
10 | ||||||
11 | Single call | 03:42:32.105 [00:00:00.000] Starting generation... | 03:49:38.451 [00:00:00.000] Starting generation... | 03:57:39.664 [00:00:00.001] Starting generation... | ||
12 | 03:42:32.139 [00:00:00.018] Writing 5 times the same file... | 03:49:38.486 [00:00:00.018] Writing 5 times the same file... | 03:57:39.700 [00:00:00.022] Writing 5 times the same file... | |||
13 | 03:42:35.294 [00:00:03.137] Writing 5 different files | 03:49:41.604 [00:00:03.101] Writing 5 different files | 03:57:43.143 [00:00:03.426] Writing 5 different files | |||
14 | 03:42:37.709 [00:00:02.396] Reading 5 times the same | 03:49:44.049 [00:00:02.426] Reading 5 times the same | 03:57:45.595 [00:00:02.437] Reading 5 times the same | |||
15 | 03:42:39.784 [00:00:02.061] Reading 5 times different | 03:57:47.796 [00:00:02.182] Reading 5 times different | ||||
16 | 03:42:41.959 [00:00:02.158] Done | 03:57:49.637 [00:00:01.825] Done | ||||
17 | ||||||
18 | Successfull | Yes | No | Yes | ||
19 | ||||||
20 | Several calls (2-3) | 03:44:27.076 [00:00:00.000] Starting generation... | 04:04:02.361 [00:00:00.000] Starting generation... | |||
21 | 03:44:27.108 [00:00:00.019] Writing 5 times the same file... | 04:04:02.397 [00:00:00.019] Writing 5 times the same file... | ||||
22 | 03:44:27.177 [00:00:00.053] Starting generation... | 04:04:03.274 [00:00:00.863] Starting generation... | ||||
23 | 03:44:27.267 [00:00:00.053] Writing 5 times the same file... | 04:04:03.301 [00:00:00.011] Writing 5 times the same file... | ||||
24 | 03:44:27.609 [00:00:00.326] Starting generation... | 04:04:07.219 [00:00:03.899] Writing 5 different files | ||||
25 | 03:44:27.635 [00:00:00.011] Writing 5 times the same file... | 04:04:07.688 [00:00:00.452] Writing 5 different files | ||||
26 | 03:44:33.721 [00:00:06.072] Writing 5 different files | 04:04:11.780 [00:00:04.065] Reading 5 times the same | ||||
27 | 03:44:34.158 [00:00:00.422] Writing 5 different files | 04:04:12.250 [00:00:00.451] Reading 5 times the same | ||||
28 | 03:44:34.609 [00:00:00.435] Writing 5 different files | 04:04:15.521 [00:00:03.255] Reading 5 times different | ||||
29 | 03:44:40.239 [00:00:05.553] Reading 5 times the same | 04:04:15.840 [00:00:00.304] Reading 5 times different | ||||
30 | 03:44:40.928 [00:00:00.674] Reading 5 times the same | 04:04:18.858 [00:00:02.999] Done | ||||
31 | 04:04:19.272 [00:00:00.394] Done | |||||
32 | ||||||
33 | Successfull | No | Yes | |||
34 | ||||||
35 | Exception | In function ReadJsonEx(), | In function ReadJsonExSafe() | |||
36 | line | using (var stream = new IsolatedStorageFileStream(fileName, FileMode.Open, store)) | return (T)jsonSerializer.Deserialize(jr); | |||
37 | ||||||
38 | Exception details | System.IO.IOException occurred | System.InvalidCastException occurred | |||
39 | _HResult=-2147024864 | _HResult=-2147467262 | ||||
40 | _message=[IO.IO_SharingViolation_File] | _message=Unable to cast object of type 'Newtonsoft.Json.Linq.JArray' to type 'System.Collections.Generic.List`1[IsoStorageManagerApp.Order]'. | ||||
41 | Arguments: Folder//TestFile1.txt | HResult=-2147467262 | ||||
42 | Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?linkid=106663&Version=4.0.50829.0&File=mscorlib.dll&Key=IO.IO_SharingViolation_File | Message=Unable to cast object of type 'Newtonsoft.Json.Linq.JArray' to type 'System.Collections.Generic.List`1[IsoStorageManagerApp.Order]'. | ||||
43 | HResult=-2147024864 | Source=IsoStorageManager | ||||
44 | Message=[IO.IO_SharingViolation_File] | StackTrace: | ||||
45 | Arguments: Folder//TestFile1.txt | at IsoStorageManagerLib.IsoStorageManager.<>c__DisplayClass3b`1.<ReadJsonExSafe>b__3a() | ||||
46 | Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?linkid=106663&Version=4.0.50829.0&File=mscorlib.dll&Key=IO.IO_SharingViolation_File | InnerException: | ||||
47 | Source=mscorlib | |||||
48 | StackTrace: | |||||
49 | at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) | |||||
50 | InnerException: | |||||
51 | ||||||
52 | ||||||
53 | ||||||
54 | ||||||
55 | ||||||
56 | ||||||
57 | ||||||
58 | ||||||
59 | ||||||
60 | ||||||
61 | ||||||
62 | ||||||
63 | ||||||
64 | ||||||
65 | ||||||
66 | ||||||
67 | ||||||
68 | ||||||
69 | ||||||
70 |