Skip to content

jannesen/Jannesen.Library.Task

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jannesen.Library.Task

Task helper functions.

  • WhenAllWithTimeout Task.WhenAll with a timeout.
  • WaitOneAsync with optional cancellation token and/or optional timeout
  • TaskLock Please a task-lock around a async section.

TaskLock

    var taskLock = new TaskLock();


    async test() {
        using (await taskLock.Enter()) {
            // one 1 task active.
        }
    }

    async test_with_timeout() {
        using (await taskLock.Enter(1000)) {
            // one 1 task active.
        }
    }

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages