×

Cooperative scheduling using coroutines and threads

  • US 7,784,051 B2
  • Filed: 11/18/2005
  • Issued: 08/24/2010
  • Est. Priority Date: 11/18/2005
  • Status: Active Grant
First Claim
Patent Images

1. A method comprising:

  • defining a first plurality of tasks associated with coroutine execution, and a second plurality of tasks associated with task-specific thread execution;

    spawning a plurality of threads, each of the plurality of threads associated with one of the second plurality of tasks;

    running a control thread to determine if a first task of the first plurality of tasks or the second plurality of tasks is associated with coroutine execution or with task-specific thread execution;

    if the first task is determined to be associated with coroutine execution, running the control thread to swap a coroutine context of the control thread with a coroutine context of the task; and

    if the first task is determined to be associated with thread execution, running the control thread to resume a first thread associated with the first task and to suspend the control thread.

View all claims
  • 2 Assignments
Timeline View
Assignment View
    ×
    ×