jacksonh / manos

Manos is an easy to use, easy to test, high performance web application framework that stays out of your way and makes your life ridiculously simple.
Other
453 stars 61 forks source link

on windows, Boundary makes an incorrect assumption about loop type #88

Closed blucz closed 13 years ago

blucz commented 13 years ago

Using git version 05935cd84305db7c7e15455d93b3f45942fe8b0e

Unhandled Exception: System.TypeInitializationException: The type initializer for 'Manos.Threading.Boundary' threw an exception. ---> System.InvalidCastException: Unable to cast object of type 'Manos.Managed.ManagedLoop' to type 'Libev.LibEvLoop'.
   at Manos.Threading.Boundary..ctor(IOLoop loop, Int32 maxWorkPerLoop) in c:\cygwin\home\brian\projects\tood\manos\upstream\src\Manos\Manos.Threading\Boundary.cs:line 47
   at Manos.Threading.Boundary..ctor(IOLoop loop) in c:\cygwin\home\brian\projects\tood\manos\upstream\src\Manos\Manos.Threading\Boundary.cs:line 44
   at Manos.Threading.Boundary..cctor() in c:\cygwin\home\brian\projects\tood\manos\upstream\src\Manos\Manos.Threading\Boundary.cs:line 36
   --- End of inner exception stack trace ---
   at Manos.Managed.Libeio.<>c__DisplayClass13.<open>b__10(Object a) in c:\cygwin\home\brian\projects\tood\manos\upstream\src\Manos\Manos.Managed\Libeio.cs:line 77
   at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
   at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()

In a request handler, I attempted to use IHTTPResponse.SendFile("foo.html"). This exception seems to have occurred in a background thread while that was attempting to complete.

jacksonh commented 13 years ago

I don't have windows here to test, but this should be fixed.

blucz commented 13 years ago

Just tested..indeed it is. Thanks.