Merge branch '2.2' into develop
This commit is contained in:
@ -357,6 +357,8 @@ static inline void dcb_readq_set(DCB *dcb, GWBUF *buffer)
|
||||
*
|
||||
* @deprecated You should not use this function, use dcb_foreach_parallel instead
|
||||
*
|
||||
* @warning This must only be called from the main thread, otherwise deadlocks occur
|
||||
*
|
||||
* @param func Function to call. The function should return @c true to continue iteration
|
||||
* and @c false to stop iteration earlier. The first parameter is a DCB and the second
|
||||
* is the value of @c data that the user provided.
|
||||
@ -366,21 +368,15 @@ static inline void dcb_readq_set(DCB *dcb, GWBUF *buffer)
|
||||
bool dcb_foreach(bool (*func)(DCB *dcb, void *data), void *data);
|
||||
|
||||
/**
|
||||
* @brief Call a function for each connected DCB
|
||||
* @brief Call a function for each connected DCB on the current worker
|
||||
*
|
||||
* @note This function can call @c func from multiple thread at one time.
|
||||
* @param func Function to call. The function should return @c true to continue
|
||||
* iteration and @c false to stop iteration earlier. The first parameter
|
||||
* is the current DCB.
|
||||
*
|
||||
* @param func Function to call. The function should return @c true to continue iteration
|
||||
* and @c false to stop iteration earlier. The first is a DCB and
|
||||
* the second is this thread's value in the @c data array that
|
||||
* the user provided.
|
||||
*
|
||||
* @param data Array of user provided data passed as the second parameter to @c func.
|
||||
* The array must have more space for pointers thann the return
|
||||
* value of `config_threadcount()`. The value passed to @c func will
|
||||
* be the value of the array at the index of the current thread's ID.
|
||||
* @param data User provided data passed as the second parameter to @c func
|
||||
*/
|
||||
void dcb_foreach_parallel(bool (*func)(DCB *dcb, void *data), void **data);
|
||||
void dcb_foreach_local(bool (*func)(DCB *dcb, void *data), void *data);
|
||||
|
||||
/**
|
||||
* @brief Return the port number this DCB is connected to
|
||||
|
||||
Reference in New Issue
Block a user