HangfireIO / Hangfire

An easy way to perform background job processing in .NET and .NET Core applications. No Windows Service or separate process required
https://www.hangfire.io
Other
9.32k stars 1.69k forks source link

Documentation request: Async Jobs #1187

Open markalanevans opened 6 years ago

markalanevans commented 6 years ago

Can you please document how to use jobs that return async Task ?

Do we need to .ConfigureAwait(false) or true?

pieceofsummer commented 6 years ago

Hangfire jobs are running in the background and don't interact with any UI. You can always use ConfigureAwait(false) since you don't need SynchronizationContext for those.

markalanevans commented 6 years ago

@pieceofsummer thank you!

We love hangfire, but we spend a lot of time learning by reading github issues...

Is there anyone managing the docs? Really trying to put examples and use cases? Best practices etc?

ltvan commented 2 weeks ago

Hangfire jobs are running in the background and don't interact with any UI. You can always use ConfigureAwait(false) since you don't need SynchronizationContext for those.

@pieceofsummer I think that this request is valid because we don't know that if Hangfire manages to have any SynchronizationContext or not. It doesn't need to interact with UI to have a SynchronizationContext. It should be documented on website.