Estoy ejecutando un programa winrt con múltiples tareas. En la mitad de la carrera, me sale el siguiente excepción:¿Existe un límite en el número de tareas?
Not enough quota is available to process this command
El seguimiento de pila es
at Windows.UI.Core.CoreDispatcher.InvokeAsync(CoreDispatcherPriority priority, InvokedHandler freeThreadedCallback, Object sender, Object context)
at System.Threading.WinRTSynchronizationContext.Post(SendOrPostCallback d, Object state)
at System.Threading.Tasks.SynchronizationContextAwaitTaskContinuation.InvokeOrPostAction(Object state)
at System.Threading.Tasks.AwaitTaskContinuation.RunInline(ContextCallback callback, Object state)
--- End of stack trace from previous location where exception was thrown ---
at System.Threading.Tasks.AwaitTaskContinuation.<ThrowAsyncIfNecessary>b__1(Object s)
at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
Luego de que se estrelle.
¿Este es un problema específico de WintRT?
¿Hay una solución?
¿Compartir un código? Creo que al ejecutar una aplicación en modo de depuración puede ver dónde se produjo la excepción – sll
Recuerde que las tareas .Net se ejecutan en un contexto de sincronización. En su caso, el contexto de sincronización es el hilo de UI (lo ve porque llama a CoreDispatcher.InvokeAsync). Eso significa que todas sus tareas se ejecutarán en serie en el hilo de la interfaz de usuario. ¿Es eso lo que pretendías? –