You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hangfire throws CS4014 compilation warning when enqueuing async jobs that return ValueTask instead of Task.
Steps to Reproduce
Working case with Task:
publicasyncTaskProcessDataAsync_Task(intid){// Async operationawaitTask.Delay(100);// Process data}// Works fine, builds successfullyBackgroundJob.Enqueue(()=>ProcessDataAsync_Task(123));
Failing case with ValueTask:
publicasyncValueTaskProcessDataAsync_ValueTask(intid){// Async operationawaitTask.Delay(100);// Process data}// Compiler warning CS4014BackgroundJob.Enqueue(()=>ProcessDataAsync_ValueTask(123));
Expected Behavior
Hangfire should support enqueuing methods that return ValueTask just as it supports methods that return Task, without throwing CS4014 compilation errors.
The text was updated successfully, but these errors were encountered:
Description
Hangfire throws CS4014 compilation warning when enqueuing async jobs that return
ValueTask
instead ofTask
.Steps to Reproduce
Working case with Task:
Failing case with ValueTask:
Expected Behavior
Hangfire should support enqueuing methods that return
ValueTask
just as it supports methods that returnTask
, without throwing CS4014 compilation errors.The text was updated successfully, but these errors were encountered: