Skip to content

Dispatcher bug: "CurrentSynchronizationContext may not be used as task scheduler" #2172

@Aaronontheweb

Description

@Aaronontheweb

Found the following bug when booting up a client application sample to use Akka.NET 1.1:

The current SynchronizationContext may not be used as a TaskScheduler.
Cause: System.InvalidOperationException: The current SynchronizationContext may not be used as a TaskScheduler.
   at System.Threading.Tasks.SynchronizationContextTaskScheduler..ctor()
   at Akka.Dispatch.CurrentSynchronizationContextExecutorServiceFactory.Produce(String id)
   at Akka.Dispatch.Dispatcher.LazyExecutorServiceDelegate.<>c__DisplayClass3_0.<.ctor>b__0()
   at Akka.Util.FastLazy`1.get_Value()
   at Akka.Dispatch.Dispatcher.ExecuteTask(IRunnable run)
   at Akka.Dispatch.MessageDispatcher.Attach(ActorCell cell)
   at Akka.Actor.ActorCell.Start()
   at Akka.Actor.RepointableActorRef.Point()
   at Akka.Actor.ActorCell.HandleSupervise(IActorRef child, Boolean async)
   at Akka.Actor.ActorCell.Supervise(IActorRef child, Boolean async)
   at Akka.Actor.ActorCell.SysMsgInvokeAll(EarliestFirstSystemMessageList messages, Int32 currentState)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions