c# - Best way to use the TaskScheduler -


my application crashing sporadically , it's because i'm making call taskscheduler.fromcurrentsynchronizationcontext() little after application has loaded.

from little testing, i've fixed issue using readonly taskscheduler field , populating in class's constructor (thanks answer) worried single instance of taskscheduler have negative consequences due size of application , dependency on taskscheduler.

has a) made change calling taskscheduler.fromcurrentsynchronizationcontext() instantiating single instance in constructor , b) had success it?


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -