Skip to content

Commit

Permalink
Modify a comment to make more accurate expression fix alibaba#6
Browse files Browse the repository at this point in the history
  • Loading branch information
念纪 committed Feb 28, 2019
1 parent 53e6068 commit 14902fa
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions coobjc/api/coobjc.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@

/**
Create a coroutine, then resume it asynchronous on current queue.
co_launch will run the block in next run loop
@param block the code execute in the coroutine
@return the coroutine instance
Expand All @@ -50,18 +49,16 @@ NS_INLINE COCoroutine * _Nonnull co_launch(void(^ _Nonnull block)(void)) {

/**
Create a coroutine, then resume it immediately on current queue.
co_launch_now will run the block in current run loop
@param block the code execute in the coroutine
*/
NS_INLINE void co_launch_now(void(^ _Nonnull block)(void)){
NS_INLINE void co_launch_now(void(^ _Nonnull block)(void)) {
COCoroutine *co = [COCoroutine coroutineWithBlock:block onQueue:nil];
[co resumeNow];
}

/**
Create a coroutine, then resume it asynchronous on current queue.
co_launch will run the block in next run loop
The stack size is 65536 by default, in case stackSize not enough, you can customize it.
Max 1M limit.
Expand All @@ -75,8 +72,7 @@ NS_INLINE COCoroutine * _Nonnull co_launch_withStackSize(NSUInteger stackSize,
}

/**
Create a coroutine & resume it immediately on given queue.
co_launch_onqueue will run the block in next run loop
Create a coroutine and resume it asynchronous on the given queue.
@param block the code execute in the coroutine
@param queue the queue which coroutine work on it.
Expand All @@ -89,7 +85,7 @@ NS_INLINE COCoroutine * _Nonnull co_launch_onqueue(dispatch_queue_t _Nullable q


/**
Create a sequence, the coroutine will be a Generator.
Create a sequence, make the coroutine be a Generator.
@param block the sequence task.
@return the Coroutine
Expand All @@ -101,8 +97,9 @@ NS_INLINE COCoroutine * _Nonnull co_sequence(void(^ _Nonnull block)(void)) {
}

/**
Create a coroutine will execute on the given queue
Create a sequence, make the coroutine be a Generator.
The code will run on specified queue.
@param block the code execute in the coroutine.
@param queue the queue which coroutine work on it.
@return the coroutine instance
Expand All @@ -126,7 +123,7 @@ NS_INLINE COActor * _Nonnull co_actor(void(^ _Nonnull block)(COActorChan* _Nonnu
}

/**
Create a coroutine will execute on the given queue
Create a actor and start it asynchronous on the given queue.
@param block the code execute in the coroutine.
@param queue the queue which coroutine work on it.
Expand Down

0 comments on commit 14902fa

Please sign in to comment.