ChangeLog 51 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618
  1. 2010-05-17 Gonzalo Paniagua Javier <[email protected]>
  2. * Timer.cs: check object reference when the timers are equal.
  3. Fixes bug #605092.
  4. 2010-04-23 Rolf Bjarne Kvinge <[email protected]>
  5. * LazyThreadSafetyMode.cs: Include in Moonlight build.
  6. 2010-04-15 Jérémie Laval <[email protected]>
  7. * AtomicBoolean.cs:
  8. * CountdownEvent.cs:
  9. * SpinLock.cs: Add BOOTSTRAP_NET_4_0 define
  10. 2010-03-25 Gonzalo Paniagua Javier <[email protected]>
  11. * ThreadPool.cs: add fast path to queue work items in the runtime.
  12. 2010-03-23 Sebastien Pouliot <[email protected]>
  13. * Monitor.cs: Implement new NET_4_0 (and SL4) Enter overload
  14. required to run some DRT tests (e.g. 7007)
  15. 2010-03-16 Jb Evain <[email protected]>
  16. * ThreadPool.cs, Thread.cs, ExecutionContext.cs: use MOONLIGHT
  17. symbol to disambiguate MonoTouch and Moonlight code.
  18. 2010-03-08 Jérémie Laval <[email protected]>
  19. * SpinLock.cs: Merge algorithm back in SpinLock struct
  20. 2010-03-08 Jérémie Laval <[email protected]>
  21. * SpinLock.cs: Update to use ticket spinlock algorithm
  22. 2010-02-26 Rodrigo Kumpera <[email protected]>
  23. * LazyThreadSafetyMode.cs: Added.
  24. 2010-02-08 Zoltan Varga <[email protected]>
  25. * WaitHandle.cs (CheckArray): Check that the handles array is not null.
  26. Fixes #576039.
  27. 2010-02-02 Jérémie Laval <[email protected]>
  28. * CancellationToken.cs:
  29. * CancellationTokenSource.cs:
  30. * ManualResetEventSlim.cs:
  31. * SemaphoreSlim.cs:
  32. * SpinLock.cs:
  33. * SpinWait.cs:
  34. * ThreadLocal.cs: Port to .NET 4 beta 2 API
  35. 2009-12-09 Jb Evain <[email protected]>
  36. * ThreadPool.cs (QueueUserWorkItem): properly throw
  37. an ANE instead of triggering a NRE when being passed a null callback.
  38. 2009-11-02 Miguel de Icaza <[email protected]>
  39. * Jumbo patch to drop support for pre-NET_2_0 code:
  40. Remove ONLY_1_1 code
  41. Remove NET_1_0 only code
  42. Remove NET_2_0 defines assuming the value is true.
  43. 2009-11-02 Sebastien Pouliot <[email protected]>
  44. * Thread.cs (set_CurrentUICulture): Delay setting in_currentculture
  45. to true until after the null check and the return statement.
  46. 2009-11-02 Jérémie Laval <[email protected]>
  47. * Parallel.cs: Added fix for Bug #536919.
  48. 2009-10-25 Sebastien Pouliot <[email protected]>
  49. * Thread.cs: Fix validations for Join and Sleep overloads
  50. 2009-10-22 Sebastien Pouliot <[email protected]>
  51. * EventWaitHandle.cs: Add validation on the EventResetMode
  52. parameter used in the constructors
  53. * Monitor.cs: Fix validations for TryEnter and Wait. Reduce
  54. duplicated code between overloads.
  55. 2009-10-21 Sebastien Pouliot <[email protected]>
  56. * WaitHandle.cs: Add missing validations for 'millisecondsTimeout'
  57. in Wait[One|Any|All]. Also call the overloaded (bool) methods for
  58. WaitAll to reduce code duplication.
  59. 2009-10-20 Sebastien Pouliot <[email protected]>
  60. * Timer.cs: Always call Init from every constructors to avoid
  61. duplicate checks. Fix validations on different dueTime and period
  62. (ctor and Change methods). Seal private TimerComparer class and
  63. avoid multiple (identical) casts in its Compare method. Seal
  64. private Scheduler class.
  65. 2009-10-20 Gonzalo Paniagua Javier <[email protected]>
  66. * Timer.cs: make sure we don't insert 2 timers with the same key.
  67. 2009-10-20 Jb Evain <[email protected]>
  68. * Thread.cs: change type of the current_appcontext field to object
  69. to avoid triggering static constructors unless explicitely required.
  70. 2009-10-16 Gonzalo Paniagua Javier <[email protected]>
  71. * Timer.cs: looks like any negative value is treated as Infinite.
  72. 2009-10-07 Sebastien Pouliot <[email protected]>
  73. * Thread.cs: Remove LocalDataStoreSlot-related methods from
  74. Moonlight build
  75. 2009-09-29 Rolf Bjarne Kvinge <[email protected]>
  76. * Thread.cs: StartSafe: ignore ThreadAbortExceptions.
  77. 2009-09-27 Gonzalo Paniagua Javier <[email protected]>
  78. * Timer.cs: account for the time spent sending jobs to the queue.
  79. 2009-09-26 Mark Probst <[email protected]>
  80. * Thread.cs: Serialize the principal so as not to make it cross
  81. appdomains. Two new internal calls for copying byte arrays
  82. between domains.
  83. 2009-09-25 Mark Probst <[email protected]>
  84. * Thread.cs: The Thread class is split up into Thread and
  85. InternalThread now. We have exactly one InternalThread per
  86. thread, and at most one Thread per appdomain per thread. Most
  87. data is stored in InternalThread. All InternalThread objects live
  88. in the root domain.
  89. * Environment.cs: Corlib version bump.
  90. 2009-09-24 Gonzalo Paniagua Javier <[email protected]>
  91. * Timer.cs: no need to wake up the scheduler when removing the next
  92. scheduled item.
  93. 2009-09-23 Gonzalo Paniagua Javier <[email protected]>
  94. * Timer.cs: rewritten. It only has one queue now and it is sorted by
  95. due time. Before this changes, it was using a lot of CPU when there
  96. were a lot of 'future' timers.
  97. 2009-09-23 Sebastien Pouliot <[email protected]>
  98. * ExecutionContext.cs: Don't use SecurityContext and don't expose
  99. AsyncFlowControl for NET_2_1
  100. * ThreadAbortException.cs: Remove ExceptionState from NET_2_1
  101. * Thread.cs: Don't expose ApartmentState and remove Suspend and
  102. Resume methods for NET_2_1
  103. * ThreadPool.cs: Remove GetAvailableThreads and Unsafe* methods
  104. for NET_2_1
  105. 2009-09-22 Jb Evain <[email protected]>
  106. * Timer.cs: MONOTOUCH doesn't support remoting, so do not pass
  107. true to exitContext when calling WaitOne on a WaitHandle.
  108. 2009-09-22 Sebastien Pouliot <[email protected]>
  109. * Thread.cs: Remove [Get|Set]CompressedStack for NET_2_1
  110. 2009-09-21 Sebastien Pouliot <[email protected]>
  111. * Thread.cs: Remove CurrentPrincipal property for NET_2_1
  112. * ExecutionContext.cs: Remove Run method for NET_2_1
  113. 2009-09-20 Sebastien Pouliot <[email protected]>
  114. * EventWaitHandle.cs: Remove AccessControl usage for NET_2_1
  115. * Mutex.cs: Remove some ctors and AccessControl usage for NET_2_1
  116. * NativeEventCalls.cs: Remove AccessControl usage for NET_2_1
  117. 2009-08-19 Jérémie Laval <[email protected]>
  118. * ParallelLoopState.cs: Take in account that
  119. AtomicBoolean is a class.
  120. 2009-08-19 Jérémie Laval <[email protected]>
  121. * AtomicBoolean.cs: Turn it into a class
  122. * CountdownEvent.cs: Work on cached variable. Make sure
  123. count doesn't go under 0.
  124. 2009-08-11 Jérémie Laval <[email protected]>
  125. * Watch.cs:
  126. * SpinWait.cs:
  127. * CountdownEvent.cs:
  128. * CancellationToken.cs:
  129. * ICancelableOperation.cs:
  130. * CancellationTokenSource.cs:
  131. * CancellationTokenRegistration.cs: Add BOOTSTRAP_NET_4_0.
  132. 2009-08-11 Jérémie Laval <[email protected]>
  133. * Parallel.cs: Disable While method.
  134. * CountdownEvent.cs: Fix method signature.
  135. * Barrier.cs: Moved type.
  136. * AggregateException.cs: Moved type.
  137. 2009-08-04 Jérémie Laval <[email protected]>
  138. * SpinLock: Remove unused private methods.
  139. 2009-08-03 Zoltan Varga <[email protected]>
  140. * Thread.cs: Always call Thread_free_internal from the finalizer, since
  141. it frees other things besides the handle. Fixes #527576.
  142. 2009-07-31 Jérémie Laval <[email protected]>
  143. * Snzi.cs:
  144. * Parallel.cs:
  145. * SpinLock.cs:
  146. * SpinWait.cs:
  147. * ThreadLocal.cs:
  148. * SemaphoreSlim.cs:
  149. * CountdownEvent.cs:
  150. * ManualResetEventSlim.cs
  151. * CancellationTokenSource.cs: Various 4.0 b1 API mismatch fixes.
  152. 2009-07-30 Jérémie Laval <[email protected]>
  153. * AggregateException.cs:
  154. * AtomicBoolean.cs:
  155. * Barrier.cs:
  156. * CSnzi.cs:
  157. * CancellationToken.cs:
  158. * CancellationTokenRegistration.cs:
  159. * CancellationTokenSource.cs:
  160. * CountdownEvent.cs:
  161. * ICancelableOperation.cs:
  162. * LazyInitializer.cs:
  163. * ManualResetEventSlim.cs:
  164. * Parallel.cs:
  165. * ParallelLoopResult.cs:
  166. * ParallelLoopState.cs:
  167. * ParallelOptions.cs:
  168. * SemaphoreSlim.cs:
  169. * Snzi.cs:
  170. * SpinLock.cs:
  171. * SpinWait.cs:
  172. * ThreadLocal.cs:
  173. * Watch.cs: Add ParallelFx files for System.Threading namespace
  174. 2009-07-21 Jb Evain <[email protected]>
  175. * ThreadPool.cs: avoid an unecessary method call when not running
  176. in moonlight.
  177. 2009-07-20 Jb Evain <[email protected]>
  178. * Thread.cs: use the moonlight specific thread start
  179. hack for the net_2_1 profile exclusively.
  180. 2009-06-25 Miguel de Icaza <[email protected]>
  181. * Timer.cs: Throw ArgumentNullException if the callback is null.
  182. 2009-06-22 Bill Holmes <[email protected]>
  183. * Thread.cs : Adding interrupt_on_stop field.
  184. Contributed under MIT/X11 license.
  185. 2009-06-10 Rolf Bjarne Kvinge <[email protected]>
  186. * Thread.cs: MoonlightUnhandledException: ensure there's no way to
  187. reach native code with a managed exception.
  188. 2009-06-10 Sebastien Pouliot <[email protected]>
  189. * Thread.cs: Refactor calling Moonlight's OnUnhandledException to
  190. make sur the delegate it not called from a [SecuritySafeCritical]
  191. caller.
  192. * ThreadPool.cs: Reuse the above code for QueueUserWorkItem.
  193. Original patch from Alan McGovern
  194. 2009-06-10 Marek Safar <[email protected]>
  195. * LockRecursionException.cs: New file.
  196. 2009-04-21 Mark Probst <[email protected]>
  197. * Thread.cs: Make the execution context field thread-static to
  198. avoid it being shared between app domains.
  199. 2009-04-20 Rolf Bjarne Kvinge <[email protected]>
  200. * Thread.cs: For 2.1 ensure exceptions in threads are handled using the
  201. UnhandledException event mechanism in System.Windows.Application instead
  202. of crashing the application.
  203. 2009-04-18 Mark Probst <[email protected]>
  204. * Thread.cs: Don't keep the current number formatter here because
  205. it's shared between app domains.
  206. 2009-04-18 Mark Probst <[email protected]>
  207. * Thread.cs: Make the abort exception state a GC handle, to
  208. properly separate AppDomains. Add internal method for getting the
  209. state object.
  210. * ThreadAbortException.cs: Get the abort exception state via the
  211. method in Thread.
  212. 2009-04-12 Gonzalo Paniagua Javier <[email protected]>
  213. * WaitHandle.cs: implemented 2 missing WaitAny overloads.
  214. 2009-03-05 Rolf Bjarne Kvinge <[email protected]>
  215. * WaitHandle.cs: Added missing WaitOne overload.
  216. 2009-02-20 Gonzalo Paniagua Javier <[email protected]>
  217. * WaitHandle.cs: implemented SignalAndWait.
  218. 2009-02-18 Jb Evain <[email protected]>
  219. * SynchronizationContext.cs: add NET_2_1 SetThreadStaticContext
  220. method, even if already obsolete.
  221. 2009-01-30 Andreia Gaita <[email protected]>
  222. * SynchronizationContext.cs: Remove moonlight hacks, dispatcher should
  223. be able to handle this now.
  224. 2008-12-20 Miguel de Icaza <[email protected]>
  225. * WaitHandle.cs: Add two overloads that were introduced in 3.5.
  226. 2008-11-25 Geoff Norton <[email protected]>
  227. * SynchronizationContext.cs: A temporary horrible hack to SyncContext
  228. to hard-wire all calls back to the main thread (moonlight-only) so that
  229. we can use our unit test harness. This will be fixed for 2.1 when we
  230. implement Dispatcher properly.
  231. 2008-10-30 Gonzalo Paniagua Javier <[email protected]>
  232. * Interlocked.cs: make CompareExchange internal in 1.1 for use by the
  233. runtime.
  234. 2008-09-19 Miguel de Icaza <[email protected]>
  235. * WaitHandle.cs (WaitOne): Add new 3.5 SP1 overload.
  236. Tue Sep 16 21:02:59 CEST 2008 Paolo Molaro <[email protected]>
  237. * Thread.cs: fixed SpinWait() implementation (bug #423582).
  238. Tue Sep 9 15:19:48 CEST 2008 Paolo Molaro <[email protected]>
  239. * Timer.cs: use a separate queue for timers that are far in the future
  240. so they don't need to be looked at as often (bug #418272).
  241. Better precision of recheduling time.
  242. 2008-07-03 Andreas Nahr <[email protected]>
  243. * ThreadPool.cs:
  244. * LockCookie.cs:
  245. * Interlocked.cs:
  246. * ExecutionContext.cs:
  247. * AsyncFlowControl.cs:
  248. * AbandonedMutexException.cs: Fix parameter names
  249. 2008-07-02 Zoltan Varga <[email protected]>
  250. * Timer.cs (SchedulerThread): Iterate through the keys of the hashtable instead
  251. of key-value pairs.
  252. 2008-06-18 Kornél Pál <[email protected]>
  253. * Thread.cs: Implement BeginThreadAffinity and EndThreadAffinity as no-op
  254. because managed and native threads are currently bound together.
  255. 2008-06-14 Zoltan Varga <[email protected]>
  256. * Thread.cs: Sync layout with unmanaged side.
  257. 2008-06-07 Zoltan Varga <[email protected]>
  258. * Monitor.cs: Implement Enter/Exit directly as icalls without managed wrapper
  259. methods.
  260. 2008-04-11 Zoltan Varga <[email protected]>
  261. * Thread.cs: Make in_currentculture non-static. Fixes #378892.
  262. 2008-04-07 Dick Porter <[email protected]>
  263. * Thread.cs: Fix throwing of exceptions when manipulating
  264. ApartmentState. Fixes part of bug 324338.
  265. 2008-04-01: Eyal Alaluf <[email protected]>
  266. * Thread.cs: Put a NumberFormatter instance as a member of the current
  267. thread so it can reused for performint ToString conversions.
  268. 2008-03-26 Massimiliano Mantione <[email protected]>
  269. * Thread.cs: Renamed "unused6" because it will be used to hold
  270. the "mono_thread_manage" callback.
  271. Tue Feb 26 17:51:58 CET 2008 Paolo Molaro <[email protected]>
  272. * Timer.cs: use a monotonic clock to schedule timers
  273. (fixes part of bug#347476).
  274. Fri Feb 22 11:23:53 CET 2008 Paolo Molaro <[email protected]>
  275. * Thread.cs: implemented Begin/EndCriticalRegion.
  276. 2008-02-03 Sebastien Pouliot <[email protected]>
  277. * WaitHandle.cs: Ifdef out some unused code (found by Gendarme).
  278. 2008-01-06 Zoltan Varga <[email protected]>
  279. * Thread.cs (set_CurrentCulture): If the culture is read-only, cache the result
  280. of serializing it.
  281. (set_CurrentUICulture): Ditto.
  282. 2008-01-03 Zoltan Varga <[email protected]>
  283. * Thread.cs (set_CurrentCulture): Avoid the serialization overhead if
  284. the new culture is equal to the old one.
  285. 2007-12-27 Zoltan Varga <[email protected]>
  286. * Thread.cs: Change the type of synch_cs to an IntPtr to be in synch with the
  287. unmanaged definition.
  288. 2007-11-20 Atsushi Enomoto <[email protected]>
  289. * ReaderWriterLock.cs : ... and avoid extra finalizer call.
  290. 2007-11-20 Atsushi Enomoto <[email protected]>
  291. * ReaderWriterLock.cs : adding missing 2.0 destructor (does nothing).
  292. Thu Nov 8 18:36:25 CET 2007 Paolo Molaro <[email protected]>
  293. * Timer.cs: if period is 0 with a non-infinite due time, we
  294. run the callback just once (bug #340212).
  295. 2007-10-24 Dick Porter <[email protected]>
  296. * Thread.cs: Call Thread_init on the new 2.0 constructors too.
  297. 2007-10-24 Dick Porter <[email protected]>
  298. * Thread.cs: Assign the ManagedThreadId when it is asked for,
  299. rather than in the constructor, so ThreadPool threads also work.
  300. Fixes bug 335579 (and doesn't break 325367 or 325566)
  301. 2007-10-24 Atsushi Enomoto <[email protected]>
  302. * SynchronizationContext.cs : removed SendOrPost().
  303. Wed Oct 17 13:24:33 CEST 2007 Paolo Molaro <[email protected]>
  304. * Timer.cs: better cleanup test for the expired array.
  305. Tue Oct 16 17:22:15 CEST 2007 Paolo Molaro <[email protected]>
  306. * Timer.cs: remove expired timers from the the jobs list.
  307. Tue Oct 16 12:14:43 CEST 2007 Paolo Molaro <[email protected]>
  308. * Timer.cs: rewrote to use threadpool threads to invoke the callbacks,
  309. avoid Thread.Abort and Thread.Interrupt and use a single scheduler
  310. thread, partially from the patch of Rafael Ferreira in bug #315999.
  311. Fixes bug #315999, #332206.
  312. 2007-10-15 Dick Porter <[email protected]>
  313. * Thread.cs: Initialise synch_cs to null now we aren't using it as
  314. a monitor lock
  315. 2007-09-25 Dick Porter <[email protected]>
  316. * Thread.cs: Keep ManagedThreadId constant over the lifetime of a
  317. Thread. Patch from [email protected] fixing bugs 325367 and
  318. 325566.
  319. 2007-09-25 Jonathan Pobst <[email protected]>
  320. * SynchronizationContext.cs: Implement SetSynchronizationContext.
  321. 2007-09-06 Dick Porter <[email protected]>
  322. * Timer.cs: Only hold a WeakReference to the runner thread, to
  323. work around an issue when finalizing at shutdown or (I think)
  324. appdomain unload. (Basically, the Thread was being finalized
  325. first, but the Timer's finalizer was still trying to reference it
  326. subsequently.)
  327. 2007-08-10 Gert Driesen <[email protected]>
  328. * Thread.cs: Throw ThreadStateException when retrieving ApartmentState
  329. or IsBackground if thread is stopped. Fixes bug #81658.
  330. 2007-08-08 Zoltan Varga <[email protected]>
  331. * Thread.cs: Add a fixme.
  332. 2007-07-21 Miguel de Icaza <[email protected]>
  333. * WaitHandle.cs (Handle): It turns out that we should never create
  334. new SafeWaitHandles, as applications will assume that a
  335. SafeWaitHandle pulled from this will be the same after a Handle
  336. update (from Gert's test):
  337. AutoResetEvent are1 = new AutoResetEvent (false);
  338. AutoResetEvent are2 = new AutoResetEvent (false);
  339. SafeWaitHandle swh1 = are1.SafeWaitHandle;
  340. Console.WriteLine ("#A1:" + !swh1.IsClosed);
  341. Console.WriteLine ("#A2:" + !swh1.IsInvalid);
  342. IntPtr dummyHandle = (IntPtr) 2;
  343. are1.Handle = dummyHandle;
  344. Console.WriteLine ("#A3:" + (are1.Handle == dummyHandle));
  345. Console.WriteLine ("#A4:" + !swh1.IsClosed);
  346. Console.WriteLine ("#A5:" + !swh1.IsClosed);
  347. Console.WriteLine ("#A6:" + !swh1.IsInvalid);
  348. Console.WriteLine ("#A7:" + !are1.SafeWaitHandle.IsClosed);
  349. Console.WriteLine ("#A8:" +
  350. !are1.SafeWaitHandle.IsInvalid);
  351. We would return in A4, A5, A6 true, even when we have set the
  352. Handle ourselves.
  353. *
  354. 2007-07-18 Miguel de Icaza <[email protected]>
  355. * WaitHandle.cs (Handle): in the 2.0 profile, explicitly dispose
  356. the old SafeWaitHandle, do not wait for the finalizer to run;
  357. Take ownership of the handle; The docs did not say that
  358. assigning to this value would lead to a leak, the docs said that
  359. in the 1.0 and 1.1 profiles assigning to this property might lead
  360. to a leak. My mistake.
  361. Fixes: 82134
  362. 2007-07-09 Atsushi Enomoto <[email protected]>
  363. * LockCookie.cs, AsyncFlowControl.cs :
  364. added missing operator == and !=.
  365. 2007-05-22 Jonathan Chambers <[email protected]>
  366. * Thread.cs: Use & to check ThreadState rather than ==.
  367. Fixes AlbumSurfer regression.
  368. 2007-05-09 Jonathan Chambers <[email protected]>
  369. * Thread.cs: Implement ApartmentState related items.
  370. 2007-05-02 Dick Porter <[email protected]>
  371. * ReaderWriterLock.cs: ReaderWriterLock derives from
  372. CriticalFinalizerObject in the 2.0 profile
  373. 2007-05-01 Dick Porter <[email protected]>
  374. * ThreadState.cs:
  375. * AsyncFlowControl.cs:
  376. * Interlocked.cs:
  377. * RegisteredWaitHandle.cs:
  378. * TimerCallback.cs:
  379. * ThreadStateException.cs:
  380. * Monitor.cs:
  381. * ThreadStart.cs:
  382. * WaitOrTimerCallback.cs:
  383. * LockCookie.cs:
  384. * EventWaitHandle.cs:
  385. * WaitHandle.cs:
  386. * ThreadAbortException.cs:
  387. * ThreadPriority.cs:
  388. * ReaderWriterLock.cs:
  389. * NativeOverlapped.cs:
  390. * Mutex.cs:
  391. * Overlapped.cs:
  392. * ThreadPool.cs:
  393. * ApartmentState.cs:
  394. * EventResetMode.cs:
  395. * SynchronizationLockException.cs:
  396. * ManualResetEvent.cs:
  397. * WaitCallback.cs:
  398. * IOCompletionCallback.cs:
  399. * AutoResetEvent.cs:
  400. * AbandonedMutexException.cs:
  401. * SendOrPostCallback.cs:
  402. * ThreadInterruptedException.cs: Update to 2.0 profile
  403. Thu Apr 19 16:47:52 CEST 2007 Paolo Molaro <[email protected]>
  404. * ThreadPool.cs: patch from Robert Jordan to implement
  405. ThreadPool.SetMaxThreads.
  406. 2007-04-03 Alp Toker <[email protected]>
  407. * Monitor.cs: Class is static in 2.0.
  408. 2007-03-27 Dick Porter <[email protected]>
  409. * Mutex.cs: Throw ApplicationException if ReleaseMutex() fails.
  410. Fixes bug 79358.
  411. Tue Jan 23 17:43:50 CET 2007 Paolo Molaro <[email protected]>
  412. * Thread.cs: mark the GC-tracked field with UIntPtr.
  413. 2006-12-31 Miguel de Icaza <[email protected]>
  414. * ThreadPool.cs: Stub a method.
  415. 2006-12-11 Miguel de Icaza <[email protected]>
  416. * WaitHandle.cs: In 2.0 use SafeWaitHandles and the SafeWaitHandle
  417. patterns instead of using directly the IntPtr Handle.
  418. Refactor the code to reuse as much as possible, and follow the new
  419. conventions where appropriate.
  420. 2006-11-07 Robert Jordan <[email protected]>
  421. * WaitHandle.cs: Don't assume Assembly.GetEntryAssembly () !=
  422. null. Fixes bug #79859.
  423. 2006-11-02 Dick Porter <[email protected]>
  424. * Thread.cs: Use the new Interrupt and SpinWait icalls.
  425. 2006-07-04 Atsushi Enomoto <[email protected]>
  426. * WaitHandle.cs : CheckArray() is also used in WaitAny(), so added
  427. extra argument to skip STAThread check.
  428. 2006-06-30 Duncan Mak <[email protected]>
  429. * WaitHandle.cs (CheckArray): Avoid using reflection unless we
  430. really need to.
  431. 2006-06-29 Duncan Mak <[email protected]>
  432. * WaitHandle.cs (CheckArray): Throw NotSupportedException if the
  433. current thread is marked with the STAThreadAttribute. Fixes bug
  434. #78455.
  435. 2006-05-05 Sebastien Pouliot <[email protected]>
  436. * ExecutionContext.cs: Don't capture the compressed stack unless the
  437. security manager is active (this wasn't ready to be called in
  438. production code).
  439. 2004-04-29 Atsushi Enomoto <[email protected]>
  440. * Timer.cs : avoid NullReferenceException when it is already disposed.
  441. Patch by [email protected]. Fixed bug #78208.
  442. 2004-04-28 Atsushi Enomoto <[email protected]>
  443. * SynchronizationContext.cs : use ThreadPool in Post(), as suggested
  444. by cl (bug #78139).
  445. 2004-04-04 Atsushi Enomoto <[email protected]>
  446. * Thread.cs : base class is CriticalFinalizerObject.
  447. * ThreadStartException.cs : no public constructors.
  448. Wed Mar 29 18:29:55 CEST 2006 Paolo Molaro <[email protected]>
  449. * Thread.cs: update for the runtime changes to culture caching.
  450. Wed Mar 15 16:35:49 CET 2006 Paolo Molaro <[email protected]>
  451. * Thread.cs: updates for LocalDataStoreSlot: we use an array as
  452. storage for the slots now so that LocalDataStoreSlot objects an be
  453. garbage collected if the user doesn't keep a reference to them.
  454. 2006-02-09 Miguel de Icaza <[email protected]>
  455. * Monitor.cs: Patch from Thong Nguyen, Wait (.., Timeout) method
  456. should allow a -1 (Timeout.Infinite) to mean indefinite wait (the
  457. code already supported this.
  458. Removed also a LAMESPEC for missing argument checking in Wait with
  459. the int argument.
  460. Fixed the use of exceptions.
  461. 2005-12-23 Dick Porter <[email protected]>
  462. * EventWaitHandle.cs:
  463. * Mutex.cs: Implement OpenExisting
  464. * NativeEventCalls.cs: Add OpenEvent icall for OpenExisting in
  465. 2.0. Add a "created" boolean out parameter to CreateEvent icall.
  466. * ManualResetEvent.cs:
  467. * AutoResetEvent.cs: Update CreateEvent icall signature (now has
  468. "created" boolean out parameter.)
  469. 2005-12-17 Dick Porter <[email protected]>
  470. * ThreadStartException.cs:
  471. * EventWaitHandle.cs:
  472. * EventResetMode.cs:
  473. * AbandonedMutexException.cs: New for 2.0 profile
  474. * ThreadState.cs:
  475. * Interlocked.cs:
  476. * RegisteredWaitHandle.cs:
  477. * Monitor.cs:
  478. * ThreadPriority.cs:
  479. * Mutex.cs:
  480. * ManualResetEvent.cs:
  481. * AutoResetEvent.cs: Updated for 2.0 profile
  482. 2005-11-23 Zoltan Varga <[email protected]>
  483. * Interlocked.cs: Add T:class constraint to the generic
  484. CompareExchange and Exchange methods.
  485. 2005-11-17 Zoltan Varga <[email protected]>
  486. * Interlocked.cs: Add generic CompareExchange and Exchange methods.
  487. 2005-11-17 Sebastien Pouliot <[email protected]>
  488. * WaitHandleCannotBeOpenedException.cs: New (2.0). Is required to
  489. compile the Semaphore tests (in System.dll).
  490. 2005-10-23 Marek Safar <[email protected]>
  491. * SynchronizationContext.cs: A few simple fixes.
  492. 2005-10-06 Sebastien Pouliot <[email protected]>
  493. * Thread.cs: Copy an existing IPrincipal to new threads. Fix bug
  494. #76332.
  495. 2005-10-06 Sebastien Pouliot <[email protected]>
  496. * Thread.cs: Added new attributes, [ReliabilityContract] for
  497. destructor and [Obsolete] for [Get|Set]CompressedStack, that were
  498. added in 2.0 RC.
  499. 2005-09-11 Zoltan Varga <[email protected]>
  500. * Thread.cs (MemoryBarrier): Make this an icall.
  501. 2005-09-10 Zoltan Varga <[email protected]>
  502. * Thread.cs (Interrupt): Make this throw a NotImplementedException.
  503. 2005-09-09 Martin Baulig <[email protected]>
  504. * Timer.cs (Timer.Runner.Start): Silently catch
  505. ObjectDisposedException and return; works around some race
  506. condition on thread abort.
  507. 2005-08-19 Dick Porter <[email protected]>
  508. * Thread.cs: Reserve 64 bits for the thread ID.
  509. 2005-07-19 Martin Baulig <[email protected]>
  510. * Timer.cs (Timer.Runner.Start): Fix a race condition which was
  511. causing a hang on exit int he debugger: check `!disposed' before
  512. `start_event.WaitOne ()' and again after it.
  513. 2005-06-07 Gonzalo Paniagua Javier <[email protected]>
  514. * Thread.cs: check that the culture is valid for formatting
  515. (ie, (!neutral || invariant)).
  516. 2005-06-07 Sebastien Pouliot <[email protected]>
  517. * Thread.cs: Added _Thread interface (and members) and a few missing
  518. attributes (for both 1.1 and 2.0).
  519. 2005-06-06 Zoltan Varga <[email protected]>
  520. * Thread.cs Mutex.cs Monitor.cs: Add some missing 2.0 attributes.
  521. 2005-05-29 Sebastien Pouliot <[email protected]>
  522. * Timer.cs: Added new constructor for 2.0 and ComVisible attribute.
  523. * Timeout.cs: This is a static class in 2.0 and ComVisible attribute.
  524. 2005-05-26 Ben Maurer <[email protected]>
  525. * Thread.cs: Use a static object for a lock rather than
  526. typeof(Thread).
  527. 2005-05-26 Sebastien Pouliot <[email protected]>
  528. * SynchronizationContext.cs: Re-introduced SendOrPost method as it's
  529. being used in System.Web.Services.
  530. 2005-05-26 Sebastien Pouliot <[email protected]>
  531. * SynchronizationContext.cs: Updated to beta2 API so it doesn't depend
  532. on the switcher structure anymore (which will be removed from the
  533. build).
  534. 2005-05-24 Sebastien Pouliot <[email protected]>
  535. * Thread.cs: Removed #pragma which aren't supported by CSC 7.x.
  536. 2005-05-20 Sebastien Pouliot <[email protected]>
  537. * AsyncFlowControl.cs: Now available, as internal, in NET_1_1. This is
  538. required to get some methods from SecurityContext and ExecutionContext
  539. working.
  540. * CompressedStack.cs: Now includes the current CompressedStack in a new
  541. Capture.
  542. * ExecutionContext.cs: Includes more methods in NET_1_1 to enable
  543. ThreadPool.UnsafeQueueUserWorkItem to work properly (i.e. without
  544. stack propagation).
  545. * Thread.cs: Made ExecutionContext field accessible from the runtime.
  546. Added stack propagation when Thread.Start is called.
  547. * ThreadPool.cs: QueueUserWorkItem now does stack propagation (done in
  548. the runtime), so I "fixed" UnsafeQueueUserWorkItem not to do so.
  549. 2005-05-19 Miguel de Icaza <[email protected]>
  550. * Thread.cs: REmove warnings.
  551. 2005-05-16 Gonzalo Paniagua Javier <[email protected]>
  552. * Thread.cs: first check for null, then set in_currentculture.
  553. 2005-05-12 Lluis Sanchez Gual <[email protected]>
  554. * Thread.cs: Moved all checks done inside sync_lock to unmanaged code.
  555. Merged Thread_internal and Start_internal into a single icall, which
  556. does all work.
  557. 2005-05-11 Sebastien Pouliot <[email protected]>
  558. * CompressedStack.cs: Allow merging of an existing CompressedStack
  559. with the actual stack of the current Thread.
  560. * Thread.cs: GetCompressedStack and SetCompressedStack are public
  561. before 2.0 but couldn't be seen with mono-api-info because of it's
  562. LinkDemand for the ECMA public key. Removed unused CompressedStack
  563. private field (now part of the ExecutionContext).
  564. 2005-05-09 Sebastien Pouliot <[email protected]>
  565. * CompressedStack.cs: GetCompressedStack is public before 2.0 but
  566. couldn't be seen with mono-api-info because of it's LinkDemand for
  567. the ECMA public key. Stack capture occurs here if none exists on the
  568. current thread.
  569. 2005-04-28 Gonzalo Paniagua Javier <[email protected]>
  570. * ReaderWriterLock.cs: fix random ApplicationException errors. Tested
  571. with the System.Web.Cache stress program. Patch by Eyal Alayuf
  572. (Mainsoft). Fixes 74598.
  573. 2005-04-28 Sebastien Pouliot <[email protected]>
  574. * Thread.cs: Added property to get the ExecutionContext in 2.0. Fixed
  575. GetCompressedStack and made SetCompressedStack available (as internal)
  576. before NET_2_0.
  577. 2005-04-28 Sebastien Pouliot <[email protected]>
  578. * AsyncFlowControl.cs: Updated wrt beta2.
  579. * ExecutionContext.cs: Updated wrt beta2. Class is now internal in
  580. NET_1_1 to allow the compressed stack propagation to other threads.
  581. * CompressedStack.cs: Updated wrt beta2. Class is internal in NET_1_1
  582. to allow the compressed stack propagation to other threads.
  583. * ContextCallback.cs: Updated wrt beta2.
  584. * HostExecutionContext.cs: Updated wrt beta2.
  585. * HostExecutionContextManager.cs: Updated wrt beta2.
  586. * Thread.cs: Added internal property to get the ExecutionContext.
  587. 2005-04-19 Zoltan Varga <[email protected]>
  588. * Thread.cs: Add some unused fields.
  589. 2005-04-07 Gonzalo Paniagua Javier <[email protected]>
  590. * ThreadPool.cs: BindHandle does nothing now.
  591. 2005-04-07 Gonzalo Paniagua Javier <[email protected]>
  592. * Thread.cs: clear the Unstarted bit before calling Start_internal.
  593. Fixes bug #72738.
  594. 2005-04-04 Ben Maurer <[email protected]>
  595. * Thread.cs: Do argument checking for Current[UI]Culture to make
  596. the exception more clear for a null value being set.
  597. 2005-03-24 Sebastien Pouliot <[email protected]>
  598. * CompressedStack.cs: Added LinkDemand for UnmanagedCode and ECMA
  599. public key on GetCompressedStack method.
  600. * Mutex: Added LinkDemand for UnmanagedCode to create named (system
  601. wide) mutexes.
  602. * Thread.cs: Added LinkDemand for ECMA public key on [Get|Set]
  603. CompressedStack methods.
  604. * WaitHandle.cs: Added LinkDemand and InheritanceDemand for
  605. UnmanagedCode on set Handle property.
  606. 2005-03-10 Zoltan Varga <[email protected]>
  607. * Thread.cs: Make slothash a ThreadStatic field. Fixes #65414.
  608. 2005-02-21 Zoltan Varga <[email protected]>
  609. * Monitor.cs Interlocked.cs: Add net 2.0 ReliabilityContractAttributes.
  610. 2005-02-20 Zoltan Varga <[email protected]>
  611. * Interlocked.cs: Applied patch from Luca Barbieri ([email protected]). Add NET 2.0 methods.
  612. Tue Feb 15 18:19:11 CET 2005 Paolo Molaro <[email protected]>
  613. * Thread.cs: make the slothash a field in MonoThread.
  614. 2005-01-27 Sebastien Pouliot <[email protected]>
  615. * Overlapped.cs: Added check for ControlPolicy and ControlEvidence for
  616. Unsafe pack. Added MonoTODO for missing security stack propagation.
  617. * Thread.cs: Add security checks for ControlThread.
  618. * ThreadPool.cs: Added declarative security checks.
  619. Thu Jan 13 18:15:32 CET 2005 Paolo Molaro <[email protected]>
  620. * Thread.cs: implement stacksize and parameterized
  621. start functionality (requires matching runtime).
  622. 2005-01-12 Gonzalo Paniagua Javier <[email protected]>
  623. * ThreadAbortException.cs: added private serialization .ctor.
  624. 2004-12-20 Sebastien Pouliot <[email protected]>
  625. * CompressedStack.cs: Implemented most todo so it's usable for CAS.
  626. * CompressedStackSwitcher.cs: Implemented most todo.
  627. * Thread.cs: Implement support for getting/setting CompressedStack.
  628. 2004-12-15 Zoltan Varga <[email protected]>
  629. * Thread.cs: Change type of culture_info and ui_culture_info to
  630. IntPtr. Implement correct culture handling for the UI culture as
  631. well.
  632. 2004-12-14 Zoltan Varga <[email protected]>
  633. * Thread.cs: Optimize CurrentCulture to avoid initializing the
  634. serialization infrastructure in the common case when the culture is
  635. not set explicitly.
  636. 2004-12-06 Zoltan Varga <[email protected]>
  637. * Thread.cs: Add new fields 'serialized_culture_info{_len}'.
  638. * Thread.cs (CurrentCulture): Fix leaking of culture info objects
  639. across appdomains. Partially fixes #50049.
  640. 2004-12-05 Miguel de Icaza <[email protected]>
  641. * AutoResetEvent.cs (Set, Reset): If we are disposed, throw a
  642. ObjectDisposedEvent, helped track the WebConnection destructor
  643. issue.
  644. 2004-09-16 Gonzalo Paniagua Javier <[email protected]>
  645. * Timer.cs: don't invoke the callback twice when the timer changes.
  646. Fixes bug #66116.
  647. 2004-09-08 Marek Safar <[email protected]>
  648. * Interlocked.cs: Class is static in NET_2_0.
  649. 2004-09-04 Sebastien Pouliot <[email protected]>
  650. * Thread.cs: Changed an imperative security demand to declarative
  651. (unsupported) so it doesn't (for now) call the security runtime.
  652. 2004-08-20 Sebastien Pouliot <[email protected]>
  653. * Thread.cs: Added Fx 2.0 properties/methods/attributes.
  654. 2004-08-12 Sebastien Pouliot <[email protected]>
  655. * CompressedStackSwitcher.cs: Added missing [ComVisible] and
  656. [ReliabilityContract] attributes.
  657. * ExecutionContext.cs: Added missing [ComVisible] and
  658. [Serializable] attributes.
  659. * HostExecutionContext.cs: Added missing [ComVisible] attribute.
  660. * HostExecutionContextManager.cs: Added missing [ComVisible] and
  661. [ReliabilityContract] attributes.
  662. * HostExecutionContextSwitcher.cs: Added missing Equals and
  663. GetHashCode methods and [ComVisible] and [ReliabilityContract] attrs.
  664. * ParameterizedThreadStart.cs: New delegate in NET_2_0.
  665. * SendOrPostCallback.cs: Added missing [ComVisible] attribute.
  666. * SynchronizationContext.cs: Added new (2.0 beta1) methods Copy and
  667. WaitHelper. Added missing [ComVisible] and [ReliabilityContract] attrs.
  668. * SynchronizationContextSwitcher.cs: Added missing [ComVisible] and
  669. [ReliabilityContract] attributes.
  670. 2004-08-08 Sebastien Pouliot <[email protected]>
  671. * HostExecutionContext.cs: Fx 2.0 stub required for AppDomain.
  672. * HostExecutionContextManager.cs: Fx 2.0 stub required for AppDomain.
  673. * HostExecutionContextSwitcher.cs: Fx 2.0 stub required for AppDomain.
  674. 2004-08-04 Gonzalo Paniagua Javier <[email protected]>
  675. * Timer.cs: don't invoke the callback if the period changes before the
  676. due time. Fixes bug #62421.
  677. 2004-07-27 Lluis Sanchez Gual <[email protected]>
  678. * ExecutionContext.cs, ExecutionContextSwitcher.cs,
  679. SynchronizationContext.cs, SynchronizationContextSwitcher.cs: Added
  680. 2.0 stubs.
  681. 2004-07-15 Dick Porter <[email protected]>
  682. * Thread.cs: Hold a lock in GetNamedDataSlot. Fixes bug 61582,
  683. based on patch by Sbastien Robitaille
  684. ([email protected]). Also fix instances of
  685. lock(typeof(Thread)) to lock a private object instead.
  686. 2004-07-14 Sebastien Pouliot <[email protected]>
  687. * AsyncFlowControl.cs: New structure in Fx 2.0 required in
  688. System.Security namespace.
  689. * CompressedStackSwitcher.cs: New structure in Fx 2.0 required in
  690. System.Security namespace.
  691. * ContextCallback.cs: New delegate in Fx 2.0 required in
  692. System.Security namespace.
  693. * CompressedStack.cs: Updated API for NET_2_0 profile.
  694. 2004-07-10 Lluis Sanchez Gual <[email protected]>
  695. * SendOrPostCallback.cs: New delegate.
  696. 2004-06-24 Dick Porter <[email protected]>
  697. * Mutex.cs: Implement the createdNew parameter
  698. 2004-06-15 Gert Driesen <[email protected]>
  699. * Thread.cs: changed return type of VolatileRead to UIntPtr
  700. * ThreadPool.cs: set return type of SetMinThreads to bool
  701. 2004-06-15 Lluis Sanchez Gual <[email protected]>
  702. * Thread.cs: Added new fields to keep sync with MonoThread.
  703. Removed state changes in Sleep and Join. The state change is now done
  704. in the icall. For accessing to internal fields lock with synch_lock
  705. instead of this, which can be a source of deadlocks.
  706. 2004-06-15 Lluis Sanchez Gual <[email protected]>
  707. * Timer.cs: Don't abort the thread if Dispose() is called from the runner
  708. thread.
  709. 2004-06-11 Gonzalo Paniagua Javier <[email protected]>
  710. * Thread.cs:
  711. (CurrentPrincipal): lock on CurrentThread, not typeof (Thread) and set
  712. the thread IPrincipal if we get it from the AppDomain.
  713. 2004-06-09 Gert Driesen <[email protected]>
  714. * CompressedStack.cs: Added finalizer to match public API of
  715. MS.NET
  716. 2004-05-19 Lluis Sanchez Gual <[email protected]>
  717. * Thread.cs: Some fixes in Abort. Implemented Suspend and Resume.
  718. Added internal interruption_requested field.
  719. 2004-05-13 Sebastien Pouliot <[email protected]>
  720. * CompressedStack.cs: Added an internal constructor so a default one
  721. doesn't appear with corcompare.
  722. * Thread.cs: Added missing MemoryBarrier (only for 1.1) and SpinWait to please
  723. corcompare. Both throw a NotImplementedException.
  724. * ThreadPool.cs: Added missing UnsafeRegisterWaitForSingleObject methods (4
  725. overloads) to please corcompare. All throw a NotImplementedException.
  726. 2004-05-12 Zoltan Varga <[email protected]>
  727. * CompressedStack.cs: New file.
  728. 2004-04-15 Lluis Sanchez Gual <[email protected]>
  729. * ThreadPool.cs: Added GetMinThreads and SetMinThreads.
  730. * Timer.cs: In Change, return false if the timer has been disposed.
  731. In Dispose, notify the WaitHandle.
  732. 2004-04-11 Lluis Sanchez Gual <[email protected]>
  733. * ReaderWriterLock.cs: More fixes: never wait where acquiring a reader lock
  734. if the thread already has the lock. Added readyWaitingReaders variable to
  735. keep track of threads ready to get the reader lock.
  736. 2004-04-11 Lluis Sanchez Gual <[email protected]>
  737. * LockQueue.cs: Moved lockCount change inside the rwlock lock. Removed
  738. lock(this) when entering the rwlock to avoid a deadlock.
  739. * ReaderWriterLock.cs: In AcquireWriterLock, queue the thread if the queue
  740. is not empty (even if state==0).
  741. 2004-04-09 Zoltan Varga <[email protected]>
  742. * Timer.cs: Call the callback immediately if dueTime is 0. Fixes
  743. #56728.
  744. 2004-04-08 Jackson Harper <[email protected]>
  745. * ReaderWriterLock.cs: Fix tyop
  746. 2004-04-08 Lluis Sanchez Gual <[email protected]>
  747. * ReaderWriterLock.cs: Changed some methods to private.
  748. * WaitHandle.cs: In Wait methods, release the synchronization context when
  749. exitContext is true.
  750. 2004-04-08 Gonzalo Paniagua Javier <[email protected]>
  751. * Timer.cs: call Abort on the Runner instance too.
  752. 2004-04-07 Jackson Harper <[email protected]>
  753. * Thread.cs: Use new culture info method for constructing the
  754. current culture.
  755. 2004-04-07 Lluis Sanchez Gual <[email protected]>
  756. * ReaderWriterLock.cs: When a thread holds a writer lock, a call to
  757. AcquireReaderLock works like a call to AcquireWriterLock.
  758. 2004-04-06 Lluis Sanchez Gual <[email protected]>
  759. * Monitor.cs: In Wait(), release the synchronization context when
  760. exitContext is true.
  761. 2004-04-06 Lluis Sanchez Gual <[email protected]>
  762. * LockCookie.cs: Keep in this class the count of reader or writer locks
  763. for a thread, not only whether it has locks or not.
  764. * LockQueue.cs: Added property for checking if a thread is waiting in
  765. the queue. Wait now returns a boolean that set to false on timeout
  766. expiration.
  767. * ReaderWriterLock.cs: Started fixing bugs but I had to rewrite a lot of it.
  768. The main change is that now it keeps a reader lock count for each
  769. thread. This is needed since methods like ReleaseLock or
  770. UpgradeToWriterLock need to return a per-thread status in LockCookie.
  771. Also added support for recursive writer-lock requests.
  772. 2004-03-21 Gonzalo Paniagua Javier <[email protected]>
  773. * ThreadAbortException.cs: use same HResult as MS.
  774. * Timer.cs: abort the running thread when disposing the Timer. This
  775. fixes NullRefs when finishing xsp.
  776. 2004-03-15 Gonzalo Paniagua Javier <[email protected]>
  777. * NativeOverlapped.cs: added 2 new internal fields.
  778. * Overlapped.cs: implemented, but it's not used.
  779. * ThreadPool.cs: implemented BindHandle.
  780. 2004-03-08 Zoltan Varga <[email protected]>
  781. * Timer.cs (Dispose): Applied patch from Jaroslaw Kowalski
  782. ([email protected]). Fix finalization problems during appdomain unload.
  783. 2004-02-23 Jackson Harper <[email protected]>
  784. * LockCookie.cs: Add some fields for restoring locks.
  785. * ReaderWriterLock.cs: Implement
  786. * LockQueue.cs: New File - used for queueing thread locks in
  787. ReaderWriterLock.
  788. 2004-02-19 Jackson Harper <[email protected]>
  789. * Monitor.cs: Fix spelleng.
  790. 2004-02-09 Zoltan Varga <[email protected]>
  791. * Thread.cs: Add fields added to unmanaged MonoThread here as well.
  792. Fixes random errors caused by memory corruption.
  793. 2004-02-06 Zoltan Varga <[email protected]>
  794. * Thread.cs: Store the thread name in unmanaged memory, since the
  795. thread object is shared between appdomains.
  796. 2004-02-05 Sebastien Pouliot <[email protected]>
  797. * Thread.cs: Implemented CurrentPrincipal.
  798. 2004-01-22 Gonzalo Paniagua Javier <[email protected]>
  799. * Thread.cs: delayed thread creation until Start is called. If we
  800. don't do that and Start() is not called, the thread is leaked. First
  801. step towards fixing bug #53078.
  802. 2003-12-02 Dick Porter <[email protected]>
  803. * Thread.cs: Throw InvalidOperationException if Thread.Name is
  804. already set.
  805. 2003-12-01 Dick Porter <[email protected]>
  806. * Thread.cs: Implement CurrentCulture and CurrentUICulture
  807. 2003-11-12 Miguel de Icaza <[email protected]>
  808. * Thread.cs: Add new VolatileRead/VolatileWrite methods from 1.1
  809. 2003-10-23 Lluis Sanchez Gual <[email protected]>
  810. * Thread.cs: Added ResetDataStoreStatus and RestoreDataStoreStatus
  811. methods. They are used in CrossAppDomainChannel to save and restore
  812. thread's local data when switching between domains.
  813. 2003-10-08 Gonzalo Paniagua Javier <[email protected]>
  814. * ManualResetEvent.cs: added check for disposed.
  815. * Thread.cs: no need to init this field.
  816. 2003-10-01 Zoltan Varga <[email protected]>
  817. * Thread.cs: Add locking to AllocateNamedDataSlot and
  818. FreeNamedDataSlot.
  819. Wed Aug 20 12:01:36 CEST 2003 Paolo Molaro <[email protected]>
  820. * Thread.cs: put all the fields at the start and add
  821. more fields needed by the runtime.
  822. 2003-08-14 Lluis Sanchez Gual <[email protected]>
  823. * Thread.cs: SetData() method: use Hashtable.Contains to check
  824. if a dataslot has been allocated (value could be null).
  825. 2003-07-23 Duncan Mak <[email protected]>
  826. * WaitHandle.cs (CheckDisposed): This method is not in the public
  827. API, mark it as 'internal'.
  828. 2003-07-01 Dick Porter <[email protected]>
  829. * Thread.cs: Throw an exception if thread creation failed.
  830. (Better than just blowing up later.)
  831. 2003-06-27 Dietmar Maurer <[email protected]>
  832. * ThreadPool.cs: use async delegate invoke.
  833. 2003-06-25 Dick Porter <[email protected]>
  834. * WaitHandle.cs: Default handle value should be InvalidHandle, not
  835. Zero.
  836. 2003-06-21 Gonzalo Paniagua Javier <[email protected]>
  837. * ThreadPool.cs: correctly create a TimeSpan with provided the number of
  838. milliseconds.
  839. * WaitHandle.cs: fixes for WaitAny/All and TimeSpan.
  840. 2003-06-06 Gonzalo Paniagua Javier <[email protected]>
  841. * WaitHandle.cs: checks and exceptions.
  842. 2003-06-02 Gonzalo Paniagua Javier <[email protected]>
  843. * NativeEventCalls.cs: added CloseEvent_intenal.
  844. * WaitHandle.cs: call CloseEvent_internal when disposing.
  845. 2003-05-31 Gonzalo Paniagua Javier <[email protected]>
  846. * RegisteredWaitHandle.cs: check that the callback is not null before
  847. invoking.
  848. * ThreadPool.cs: fixed timeout -> TimeSpan conversions (closes bug
  849. #43963). Queue the item before setting the handle. If there's a timeout,
  850. avoid trying to Dequeue, getting the exception et al, just continue the
  851. loop.
  852. Mon May 19 09:07:45 CEST 2003 Paolo Molaro <[email protected]>
  853. * Monitor.cs: removed test_owner, the check is already done in the
  854. icall.
  855. Tue May 13 15:34:29 CEST 2003 Paolo Molaro <[email protected]>
  856. * Thread.cs: added missing field used by the runtime and
  857. a new field to support thread-static data.
  858. 2003-04-17 Pedro Mart?ez Juli? <[email protected]>
  859. * Timer.cs: Change the position of two lines because they were
  860. before the "if" that ensures the integrity. After this, the first of
  861. that two lines was producing a NullReferenceException.
  862. 2003-04-09 Dick Porter <[email protected]>
  863. * Thread.cs: Make sure a reference to the ThreadStart delegate is
  864. held. There's no telling how long it will be before
  865. Thread.Start() is called, and GC might destroy the delegate.
  866. Thread() and Start() need to be rewritten so that the runtime
  867. creates the new thread when Start() is called, which will simplify
  868. the code a great deal.
  869. 2003-03-20 Miguel de Icaza <[email protected]>
  870. * Thread.cs (CurrentCuluture): use the invaraint culture instead
  871. of "" for the current_culture setting.
  872. 2003-03-25 Zoltan Varga <[email protected]>
  873. * Thread.cs: Fix visibility of ResetAbort().
  874. 2003-03-18 Dick Porter <[email protected]>
  875. * Thread.cs: Keep the thread state updated in all the places that
  876. require it. (Suspend, Resume and Interrupt not handled yet)
  877. 2003-03-03 Lluis Sanchez Gual <[email protected]>
  878. * Thread.cs: Changed implementation of CurrentContext, adapted to the changes
  879. in the runtime.
  880. 2003-02-19 Gonzalo Paniagua Javier <[email protected]>
  881. * Thread.cs: implemented CurrentContext.
  882. 2003-02-17 Gonzalo Paniagua Javier <[email protected]>
  883. * Thread.cs: made the thread_id for the current thread accesible through
  884. an internal property.
  885. 2003-02-17 Dick Porter <[email protected]>
  886. * Thread.cs: Added the Start semaphore field to the class. Update
  887. the thread state after Start() has returned, not before.
  888. 2003-02-13 Zoltan Varga <[email protected]>
  889. * Thread.cs (Sleep): Timeout.Infinite is a value argument.
  890. 2003-02-11 Dick Porter <[email protected]>
  891. * Monitor.cs: Infinite wait is Infinite, not 0 ms
  892. 2003-02-10 Gonzalo Paniagua Javier <[email protected]>
  893. * Thread.cs: fixed bug #37759.
  894. 2003-02-07 Patrik Torstensson
  895. * Timer.cs: Set the Background thread flag for the timer thread
  896. 2003-02-05 Patrik Torstensson
  897. * ThreadPool.cs: Reformated and fixed issue that made all thread exit the pool.
  898. 2003-02-04 Lluis Sanchez Gual <[email protected]>
  899. * ThreadPool.cs: Implemented RegisterWaitForSingleObject methods.
  900. Tue Jan 28 17:55:59 CET 2003 Paolo Molaro <[email protected]>
  901. * Thread.cs: delay-init datastorehash.
  902. 2003-01-10 Patrik Torstensson <[email protected]>
  903. * ThreadPool.cs: Temporary removed the usage of monitor thread, implemented a
  904. model more equal to the MS one.
  905. 2002-12-10 Dick Porter <[email protected]>
  906. * Monitor.cs:
  907. * Thread.cs:
  908. * ThreadPool.cs:
  909. * Timer.cs:
  910. * WaitHandle.cs: Use TotalMilliseconds to convert a TimeSpan to
  911. ms, not Milliseconds.
  912. 2002-12-07 Martin Baulig <[email protected]>
  913. * Timer.cs: Make it actually work; now it no longer sets your
  914. application on fire if you use a zero periode and Timer.Change()
  915. actually works.
  916. 2002-11-11 Gonzalo Paniagua Javier <[email protected]>
  917. * Timer.cs: implemented more stuff. It works now.
  918. 2002-10-25 Zoltan Varga <[email protected]>
  919. * Thread.cs: Implement GetDomain() and GetDomainID().
  920. 2002-10-24 Gonzalo Paniagua Javier <[email protected]>
  921. * ThreadPool.cs: now the monitor thread is not sleeping and checking if
  922. more worker threads needed. It waits on _DataInQueue. If (and only if)
  923. there's data in the queue it checks if more worker threads needed and
  924. then sleeps 0.5s before waiting for queued data again.
  925. 2002-09-28 Gonzalo Paniagua Javier <[email protected]>
  926. * ThreadPool.cs: set IsThreadPoolThread before starting the worker.
  927. 2002-09-11 Dick Porter <[email protected]>
  928. * Mutex.cs:
  929. * ManualResetEvent.cs:
  930. * AutoResetEvent.cs: Use the WaitHandle.Handle property instead of
  931. the private field
  932. * WaitHandle.cs: Hide the os_handle field and the WaitOne_internal
  933. method
  934. 2002-09-03 Dick Porter <[email protected]>
  935. * Thread.cs: Added thread ID field
  936. 2002-08-27 Gonzalo Paniagua Javier <[email protected]>
  937. * WaitHandle.cs: IDisposable fixes.
  938. 2002-08-14 Dick Porter <[email protected]>
  939. * Thread.cs: Make CurrentUICulture act the same as CurrentCulture
  940. for now.
  941. 2002-08-12 Dietmar Maurer <[email protected]>
  942. * ThreadAbortException.cs: impl. ExceptionState property.
  943. * Thread.cs: moved all instance variables to the start of the
  944. class. added support for Thread::Abort()
  945. 2002-04-30 Dick Porter <[email protected]>
  946. * Thread.cs: If LocalDataStoreSlot already has data set, remove it
  947. before adding a new one.
  948. Use the Thread object destructor to tell the runtime to close the
  949. thread handle.
  950. 2002-04-14 Patrik Torstensson <[email protected]>
  951. * Interlocked.cs: made all methods icalls.
  952. 2002-04-14 Gonzalo Paniagua Javier <[email protected]>
  953. * IOCompletionCallback.cs: added attributes to the delegate
  954. (CLSCompliant(false) and Serializable).
  955. 2002-04-14 Patrik Torstensson <[email protected]>
  956. * Thread.cs: Fixed IsThreadPoolThread to use a internal property instead of extending
  957. the threadstate enum.
  958. * ThreadPool.cs: Now using the internal Isthreadpoolthread property
  959. * ThreadState.cs: removed non-standard enum (ThreadPoolThread)
  960. 2002-04-14 Patrik Torstensson <[email protected]>
  961. * ThreadState.cs: Added enum for threadpool thread
  962. * Thread.cs: changed the set/clr_state to be internal (used from threadpool)
  963. * Thread.cs: Added IsThreadPoolThread
  964. * ThreadPool.cs: Implementation of QueueUserWorkItem
  965. Wed Feb 13 21:51:30 CET 2002 Paolo Molaro <[email protected]>
  966. * Thread.cs: implement CurrentCulture property needed by
  967. Convert.ChangeType() (used when compiling enums).
  968. 2002-01-23 Dick Porter <[email protected]>
  969. * ManualResetEvent.cs:
  970. * AutoResetEvent.cs: Fixed DOS line endings
  971. 2002-01-22 Veronica De Santis <[email protected]>
  972. * NativeEventCalls : Class that contains internal calls shared by Auto
  973. and Manual Reset Events
  974. * AutoResetEvents.cs : Added class AutoResetEvents and its implementation
  975. * ManualResetEvents.cs : Added class ManualResetEvents and its implementation
  976. 2002-01-16 Veronica De Santis <[email protected]>
  977. * WaitHandle.cs : Renamed handle to os_handle and make it protected
  978. instead of private.
  979. * Mutex.cs : Write the System.Threading.Mutex methods ( constructors
  980. and the ReleaseMutex)
  981. 2002-01-15 Dick Porter <[email protected]>
  982. * WaitHandle.cs:
  983. * Thread.cs: Make the runtime's idea of infinite timeouts coincide
  984. with the class library's
  985. 2002-01-10 Dick Porter <[email protected]>
  986. * WaitHandle.cs: Added checks for too many handles and null
  987. handles in WaitAll() and WaitAny
  988. 2002-01-05 Ravi Pratap <[email protected]>
  989. * AutoResetEvent.cs, ManualResetEvent.cs, Monitor.cs : MonoTODO
  990. decoration.
  991. * Mutex.cs, Overlapped.cs, ReaderWriterLock.cs, RegisteredWaitHandle.cs,
  992. Thread.cs, ThreadAbortException.cs, ThreadPool.cs, Timer.cs, WaitHandler.cs : Ditto.
  993. 2001-12-11 Dick Porter <[email protected]>
  994. * WaitHandle.cs: Implemented WaitAll(), WaitAny() and WaitOne() as
  995. internal calls.
  996. 2001-11-26 Dick Porter <[email protected]>
  997. * Thread.cs: DataSlot uses a single system TLS slot, and a
  998. hashtable per thread. Some minor changes to reflect the new
  999. internal calls using the new IO library, and the newly-supported
  1000. bool returns from internal calls.
  1001. * Monitor.cs: Use bool returns from internal calls now they are
  1002. supported by the runtime. Coalesce enter with the try_enter
  1003. internal call.
  1004. Wed Nov 14 17:06:18 CET 2001 Paolo Molaro <[email protected]>
  1005. * Overlapped.cs, ThreadPool.cs, Timer.cs: CLSCompliant updates.
  1006. 2001-10-03 Dick Porter <[email protected]>
  1007. * Monitor.cs: Implemented all methods except the two Wait()
  1008. methods that take boolean parameters
  1009. 2001-09-28 Dick Porter <[email protected]>
  1010. * Thread.cs: Implemented AllocateDataSlot(),
  1011. AllocateNamedDataSlot(), FreeNamedDataSlot(), GetData(),
  1012. GetNamedDataSlot(), SetData(), IsBackground. Reworked Thread()
  1013. and Start() to avoid a race condition. Added thread-safe state
  1014. changing private operations.
  1015. * Monitor.cs: Comment out the GetType() calls because it isn't implemented yet
  1016. 2001-09-25 Dick Porter <[email protected]>
  1017. * Thread.cs: Implement Join and timed Join, set correct state
  1018. around Start, Join and Sleep calls, implement IsAlive and
  1019. ThreadState properties.
  1020. * ThreadState.cs (Threading): Added StopRequested,
  1021. SuspendRequested, Suspended values
  1022. 2001-09-23 Dick Porter <[email protected]>
  1023. * Thread.cs: Implemented CurrentThread and Sleep (both versions)
  1024. with internal calls, and Name.
  1025. 2001-09-21 Dick Porter <[email protected]>
  1026. * Thread.cs: Implement Thread(ThreadStart) constructor and Start()
  1027. with an internal call
  1028. * WaitHandle.cs: Close calls Dispose(false)
  1029. 2001-09-13 Dick Porter <[email protected]>
  1030. * ApartmentState.cs (Threading): Set the correct enum values
  1031. 2001-09-13 Dick Porter <[email protected]>
  1032. * ApartmentState.cs, AutoResetEvent.cs, IOCompletionCallback.cs,
  1033. Interlocked.cs, LockCookie.cs, ManualResetEvent.cs, Monitor.cs,
  1034. Mutex.cs, NativeOverlapped.cs, Overlapped.cs, ReaderWriterLock.cs,
  1035. RegisteredWaitHandle.cs, SynchronizationLockException.cs,
  1036. Thread.cs, ThreadAbortException.cs, ThreadInterruptedException.cs,
  1037. ThreadPool.cs, ThreadStart.cs, ThreadStateException.cs,
  1038. Timeout.cs, Timer.cs, TimerCallback.cs, WaitCallback.cs,
  1039. WaitHandle.cs, WaitOrTimerCallback.cs: System.Threading class
  1040. stubs.
  1041. 2001-07-18 Michael Lambert <[email protected]>
  1042. * ThreadPriority.cs, ThreadState.cs: Add.