目录
12、pthread_rwlockattr_getpshared
13、pthread_rwlockattr_setpshared
14、pthread_rwlockattr_getkind_np
15、pthread_rwlockattr_setkind_np
一、多线程相关文章链接
1、《Unix环境高级编程-学习-06-多线程之创建、销毁、属性获取和设置》
3、《Unix环境高级编程-学习-08-多线程之自旋锁与屏障》
二、自由抒发
如果大家想多学C的知识,除了看书、多练以外,也要多看linux自带的手册,通过man命令查看,内容很全,真的很棒,也同时提高英文文章的阅读能力,最后祝大家心想事成。
1、读写锁
对于某些临界资源,我们读多写少,例如一个数组,我们只是想看其数据,那我们可以读取,同时其他人也可以读取,并不影响读取到的内容,所以读和读之间不互斥,这就是读锁的作用,但有时也避免不了修改操作,所以需要加写锁,读和写是互斥,如果不互斥,会发生什么呢,我数据写到一半,你正好来读取数据,读到的就是错误数据,所以读和写必须是互斥的,我们对于读写锁的合理使用可以适当提高程序的并发。
2、条件变量
互斥锁在同一时间点只有一个人可以访问临界资源,但实际开发中互斥锁并不满足我们的所有需求,例如我们需要等到临界资源到达某个状态,才可以访问,互斥锁实现起来就比较繁琐。像生产者消费者模型中的队列就需要用到条件变量来实现。
三、函数介绍
1、pthread_rwlock_init
(1)声明
cpp
int pthread_rwlock_init(pthread_rwlock_t *__restrict__ __rwlock, const pthread_rwlockattr_t *__restrict__ __attr);
(2)作用
初始化读写锁。
(3)参数
|----------|------------|
| 参数名 | 描述 |
| __rwlock | 需要初始化的读写锁。 |
| __attr | 读写锁的属性。 |
(4)返回值
|----|--------|
| 名称 | 描述 |
| 成功 | 返回0。 |
| 失败 | 返回错误码。 |
(5)注意点
如果pthread_rwlock_init()调用已经初始化过的读写锁,结果是未定义。
如果在未初始化的情况下使用读写锁,则结果是未定义的。
(6)宏
无。
2、pthread_rwlock_destroy
(1)声明
cpp
int pthread_rwlock_destroy(pthread_rwlock_t *__rwlock);
(2)作用
销毁读写锁。
(3)参数
|----------|-----------|
| 参数名 | 描述 |
| __rwlock | 需要销毁的读写锁。 |
(4)返回值
|----|--------|
| 名称 | 描述 |
| 成功 | 返回0。 |
| 失败 | 返回错误码。 |
(5)注意点
销毁一个未初始化的读写锁,行为是未知的。
当读写锁被使用时,进行销毁,结果是未知的。
(6)宏
无。
3、pthread_rwlock_rdlock
(1)声明
cpp
int pthread_rwlock_rdlock(pthread_rwlock_t *__rwlock);
(2)作用
加读锁。
(3)参数
|----------|--------------|
| 参数名 | 描述 |
| __rwlock | 需要加读锁的读写锁变量。 |
(4)返回值
|----|--------|
| 名称 | 描述 |
| 成功 | 返回0。 |
| 失败 | 返回错误码。 |
(5)注意点
一个线程加多少次读锁就需要解多少次读锁。
一个线程拿到读锁后,继续拿写锁,会导致死锁。
如果在未初始化的读写锁上加读锁,行为是未定义的。
如果信号被传送到等待读写锁进行读取的线程,则在从信号处理程序返回时,线程会继续等待读写锁进行读取,就好像它没有中断一样。
(6)宏
|---------|------------------------|
| 名称 | 描述 |
| EINVAL | 读写锁指定的值不引用初始化的读写锁对象。 |
| EAGAIN | 无法获取读锁,因为已超出读写锁的最大读锁数。 |
| EDEADLK | 当前线程已经拥有用于写入的读写锁。 |
4、pthread_rwlock_tryrdlock
(1)声明
cpp
int pthread_rwlock_tryrdlock(pthread_rwlock_t *__rwlock);
(2)作用
尝试加读锁。
(3)参数
|----------|--------------|
| 参数名 | 描述 |
| __rwlock | 需要加读锁的读写锁变量。 |
(4)返回值
|----|--------|
| 名称 | 描述 |
| 成功 | 返回0。 |
| 失败 | 返回错误码。 |
(5)注意点
一个线程加多少次读锁就需要解多少次读锁。
一个线程拿到读锁后,继续拿写锁,会导致死锁。
如果在未初始化的读写锁上加读锁,行为是未定义的。
如果信号被传送到等待读写锁进行读取的线程,则在从信号处理程序返回时,线程会继续等待读写锁进行读取,就好像它没有中断一样。
(6)宏
|--------|-----------------------------------------|
| 名称 | 描述 |
| EINVAL | 读写锁指定的值不引用初始化的读写锁对象。 |
| EAGAIN | 无法获取读锁,因为已超出读写锁的最大读锁数。 |
| EBUSY | 无法获取读写锁进行读取,因为写入者持有该锁,或者具有适当优先级的写入者被锁住。 |
5、pthread_rwlock_timedrdlock
(1)声明
cpp
int pthread_rwlock_timedrdlock(pthread_rwlock_t *__restrict__ __rwlock, const struct timespec *__restrict__ __abstime);
(2)作用
在绝对时间内加读锁,如果这个时间内没有拿到则抛错。
(3)参数
|-----------|--------------|
| 参数名 | 描述 |
| __rwlock | 需要加读锁的读写锁变量。 |
| __abstime | 绝对时间。 |
(4)返回值
|----|--------|
| 名称 | 描述 |
| 成功 | 返回0。 |
| 失败 | 返回错误码。 |
(5)注意点
一个线程拿到读锁后,继续拿写锁,会导致死锁。
如果在未初始化的读写锁上加读锁,行为是未定义的。
如果信号被传送到等待读写锁进行读取的线程,则在从信号处理程序返回时,线程会继续等待读写锁进行读取,就好像它没有中断一样。
(6)宏
|-----------|------------------------|
| 名称 | 描述 |
| EINVAL | 读写锁指定的值不引用初始化的读写锁对象。 |
| EAGAIN | 无法获取读锁,因为已超出读写锁的最大读锁数。 |
| EDEADLK | 当前线程已经拥有用于写入的读写锁。 |
| ETIMEDOUT | 指定的绝对时间内无法获得锁。 |
6、pthread_rwlock_wrlock
(1)声明
cpp
int pthread_rwlock_wrlock(pthread_rwlock_t *__rwlock);
(2)作用
加写锁。
(3)参数
|----------|--------------|
| 参数名 | 描述 |
| __rwlock | 需要加写锁的读写锁变量。 |
(4)返回值
|----|--------|
| 名称 | 描述 |
| 成功 | 返回0。 |
| 失败 | 返回错误码。 |
(5)注意点
1、Implementations may favor writers over readers to avoid writer starvation.
底层实现相较于读者更青睐于写者,要避免饥饿写。
这里有一个名词饥饿写,什么是饥饿写,我们问一下chatgpt:
bash
在C语言中,读写锁是一种用于多线程编程的同步机制。它允许多个线程同时读取共享数据,但只允许一个线程进行写操作。读写锁中的饥饿写是指当有大量读操作时,写操作可能会被长时间地延迟,导致写操作的线程一直无法获取到写锁的情况。
读写锁的设计目的是为了提高并发性能,因为读操作不会修改共享数据,所以多个线程可以同时进行读操作而不会产生冲突。但是当有写操作时,需要独占地访问共享数据,因此需要获取写锁。如果读操作非常频繁,那么写操作可能会一直等待读操作完成,从而导致饥饿写的问题。
饥饿写可能会导致写操作的线程长时间地等待,降低了系统的响应性能。为了解决这个问题,可以采用一些策略来减少饥饿写的影响,例如增加写操作的优先级、限制读操作的数量等。
2、一个线程拿到写锁后,继续拿读写锁,会导致死锁。
3、如果在未初始化的读写锁上加写锁,行为是未定义的。
4、如果信号被传送到等待读写锁进行读取的线程,则在从信号处理程序返回时,线程会继续等待读写锁进行写入,就好像它没有中断一样。
(6)宏
|---------|----------------------|
| 名称 | 描述 |
| EINVAL | 读写锁指定的值不引用初始化的读写锁对象。 |
| EDEADLK | 当前线程已经拥有用于写入的读写锁。 |
7、pthread_rwlock_trywrlock
(1)声明
cpp
int pthread_rwlock_trywrlock(pthread_rwlock_t *__rwlock);
(2)作用
尝试加写锁。
(3)参数
|----------|--------------|
| 参数名 | 描述 |
| __rwlock | 需要加写锁的读写锁变量。 |
(4)返回值
|----|--------|
| 名称 | 描述 |
| 成功 | 返回0。 |
| 失败 | 返回错误码。 |
(5)注意点
同pthread_rwlock_wrlock。
(6)宏
|--------|-----------------------------------------|
| 名称 | 描述 |
| EINVAL | 读写锁指定的值不引用初始化的读写锁对象。 |
| EBUSY | 无法获取读写锁进行读取,因为写入者持有该锁,或者具有适当优先级的写入者被锁住。 |
8、pthread_rwlock_timedwrlock
(1)声明
cpp
int pthread_rwlock_timedwrlock(pthread_rwlock_t *__restrict__ __rwlock, const struct timespec *__restrict__ __abstime);
(2)作用
对读写锁变量进行写加锁,指定时间内未拿到锁函数返回。
(3)参数
|-----------|--------------|
| 参数名 | 描述 |
| __rwlock | 需要加写锁的读写锁变量。 |
| __abstime | 绝对时间。 |
(4)返回值
|----|--------|
| 名称 | 描述 |
| 成功 | 返回0。 |
| 失败 | 返回错误码。 |
(5)注意点
一个线程拿到读写锁后,继续拿写锁,会导致死锁。
如果在未初始化的读写锁上加写锁,行为是未定义的。
如果信号被传送到等待读写锁进行写入的线程,则在从信号处理程序返回时,线程会继续等待读写锁进行写入,就好像它没有中断一样。
(6)宏
|-----------|----------------------|
| 名称 | 描述 |
| EINVAL | 读写锁指定的值不引用初始化的读写锁对象。 |
| EDEADLK | 当前线程已经拥有用于写入的读写锁。 |
| ETIMEDOUT | 指定的绝对时间内无法获得锁。 |
9、pthread_rwlock_unlock
(1)声明
cpp
int pthread_rwlock_unlock(pthread_rwlock_t *__rwlock);
(2)作用
对读写锁变量进行解锁。
(3)参数
|----------|-------------|
| 参数名 | 描述 |
| __rwlock | 需要解锁的读写锁变量。 |
(4)返回值
|----|--------|
| 名称 | 描述 |
| 成功 | 返回0。 |
| 失败 | 返回错误码。 |
(5)注意点
1、如果调用解读写锁函数的线程没有持有读写锁,结果是未知的。
2、如果锁在可用时有线程被阻塞,则调度策略应确定哪个线程应获得锁。 如果支持"线程执行调度"选项,则当使用调度策略 SCHED_FIFO、SCHED_RR 或 SCHED_SPORADIC 执行的线程正在等待锁时,当锁可用时,它们应按优先级顺序获取锁。对于优先级相等的线程,写入锁应优先于读锁。 如果不支持"线程执行调度"选项,则由实现定义写入锁是否优先于读锁。
SCHED_FIFO、SCHED_RR、SCHED_SPORADIC这三个宏需要用pthread_setschedparam函数配置,后面我摸索一下,再给大家介绍一下。
3、如果在未初始化的读写锁上解锁,行为是未定义的。
(6)宏
|--------|----------------------|
| 名称 | 描述 |
| EINVAL | 读写锁指定的值不引用初始化的读写锁对象。 |
| EPERM | 当前线程未持有读写锁。 |
10、pthread_rwlockattr_init
(1)声明
cpp
int pthread_rwlockattr_init(pthread_rwlockattr_t *__attr);
(2)作用
初始化读写锁属性。
(3)参数
|--------|--------------|
| 参数名 | 描述 |
| __attr | 需要初始化的读写锁属性。 |
(4)返回值
|----|--------|
| 名称 | 描述 |
| 成功 | 返回0。 |
| 失败 | 返回错误码。 |
(5)注意点
1、如果使用pthread_rwlockattr_init初始化一个已经初始化过的读写锁属性,结果是未知的。
(6)宏
|--------|--------------------|
| 名称 | 描述 |
| ENOMEM | 内存不足,无法初始化读写锁属性对象。 |
11、pthread_rwlockattr_destroy
(1)声明
cpp
int pthread_rwlockattr_destroy(pthread_rwlockattr_t *__attr);
(2)作用
销毁读写锁属性。
(3)参数
|--------|-------------|
| 参数名 | 描述 |
| __attr | 需要销毁的读写锁属性。 |
(4)返回值
|----|--------|
| 名称 | 描述 |
| 成功 | 返回0。 |
| 失败 | 返回错误码。 |
(5)注意点
1、在对象被销毁后以其他方式引用对象的结果是未定义的。
(6)宏
|--------|---------------|
| 名称 | 描述 |
| EINVAL | 指定的__attr值无效。 |
12、pthread_rwlockattr_getpshared
(1)声明
cpp
int pthread_rwlockattr_getpshared(const pthread_rwlockattr_t *__restrict__ __attr, int *__restrict__ __pshared);
(2)作用
获取读写锁变量进程共享属性值。
(3)参数
|-----------|--------|
| 参数名 | 描述 |
| __attr | 读写锁属性。 |
| __pshared | 共享属性值。 |
(4)返回值
|----|--------|
| 名称 | 描述 |
| 成功 | 返回0。 |
| 失败 | 返回错误码。 |
(5)注意点
1、如果指定的共享属性是PTHREAD_PROCESS_PRIVATE,多进程之间使用读写锁,行为是未定义的。
(6)宏
|--------|---------------|
| 名称 | 描述 |
| EINVAL | 指定的__attr值无效。 |
|-------------------------|----------------|
| 名称 | 描述 |
| PTHREAD_PROCESS_PRIVATE | 同一个进程内的多个线程可用。 |
| PTHREAD_PROCESS_SHARED | 多个进程之间可用。 |
13、pthread_rwlockattr_setpshared
(1)声明
cpp
int pthread_rwlockattr_setpshared(pthread_rwlockattr_t *__attr, int __pshared);
(2)作用
设置读写锁变量进程共享属性值。
(3)参数
|-----------|--------|
| 参数名 | 描述 |
| __attr | 读写锁属性。 |
| __pshared | 共享属性值。 |
(4)返回值
|----|--------|
| 名称 | 描述 |
| 成功 | 返回0。 |
| 失败 | 返回错误码。 |
(5)注意点
1、如果指定的共享属性是PTHREAD_PROCESS_PRIVATE,多进程之间使用读写锁,行为是未定义的。
(6)宏
|--------|---------------|
| 名称 | 描述 |
| EINVAL | 指定的__attr值无效。 |
|-------------------------|----------------|
| 名称 | 描述 |
| PTHREAD_PROCESS_PRIVATE | 同一个进程内的多个线程可用。 |
| PTHREAD_PROCESS_SHARED | 多个进程之间可用。 |
14、pthread_rwlockattr_getkind_np
(1)声明
cpp
int pthread_rwlockattr_getkind_np(const pthread_rwlockattr_t *__restrict__ __attr, int *__restrict__ __pref);
(2)作用
获取读写锁变量偏好属性值。
(3)参数
|--------|-----------------|
| 参数名 | 描述 |
| __attr | 读写锁属性。 |
| __pref | 获取到的读写锁变量偏好属性值。 |
(4)返回值
|----|--------|
| 名称 | 描述 |
| 成功 | 返回0。 |
| 失败 | 返回错误码。 |
(5)注意点
这个函数man手册里和书本里没有介绍,是chatgpt告诉我的,大家知道相关资料在哪里查找,也和我说说。
(6)宏
|----------------------------------------------|-----------------------------------------------------------------------------|
| 名称 | 描述 |
| PTHREAD_RWLOCK_PREFER_READER_NP | 该宏用于设置读写锁的偏好模式为读者优先。在读写锁处于等待状态时,如果有多个读者和一个写者同时请求锁,读者会被优先选择。 |
| PTHREAD_RWLOCK_PREFER_WRITER_NP | 该宏用于设置读写锁的偏好模式为写者优先。在读写锁处于等待状态时,如果有一个读者和一个写者同时请求锁,写者会被优先选择。 |
| PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP | 该宏用于设置读写锁的偏好模式为非递归写者优先。在读写锁处于等待状态时,如果有一个读者和一个写者同时请求锁,写者会被优先选择,并且写者不能递归地获取锁。 |
15、pthread_rwlockattr_setkind_np
(1)声明
cpp
int pthread_rwlockattr_setkind_np(pthread_rwlockattr_t *__attr, int __pref);
(2)作用
设置读写锁变量偏好属性值。
(3)参数
|--------|----------------|
| 参数名 | 描述 |
| __attr | 读写锁属性。 |
| __pref | 设置的读写锁变量偏好属性值。 |
(4)返回值
|----|--------|
| 名称 | 描述 |
| 成功 | 返回0。 |
| 失败 | 返回错误码。 |
(5)注意点
这个函数man手册里和书本里没有介绍,是chatgpt告诉我的,大家知道相关资料在哪里查找,也和我说说。
(6)宏
|----------------------------------------------|-----------------------------------------------------------------------------|
| 名称 | 描述 |
| PTHREAD_RWLOCK_PREFER_READER_NP | 该宏用于设置读写锁的偏好模式为读者优先。在读写锁处于等待状态时,如果有多个读者和一个写者同时请求锁,读者会被优先选择。 |
| PTHREAD_RWLOCK_PREFER_WRITER_NP | 该宏用于设置读写锁的偏好模式为写者优先。在读写锁处于等待状态时,如果有一个读者和一个写者同时请求锁,写者会被优先选择。 |
| PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP | 该宏用于设置读写锁的偏好模式为非递归写者优先。在读写锁处于等待状态时,如果有一个读者和一个写者同时请求锁,写者会被优先选择,并且写者不能递归地获取锁。 |
16、pthread_cond_init
(1)声明
cpp
int pthread_cond_init(pthread_cond_t *__restrict__ __cond, const pthread_condattr_t *__restrict__ __cond_attr);
cpp
PTHREAD_COND_INITIALIZER;
第一个动态初始化,第二个静态初始化。
(2)作用
初始化条件变量。
(3)参数
|-------------|---------|
| 参数名 | 描述 |
| __cond | 条件变量。 |
| __cond_attr | 条件变量属性。 |
(4)返回值
|----|--------|
| 名称 | 描述 |
| 成功 | 返回0。 |
| 失败 | 返回错误码。 |
(5)注意点
1、只有 cond 本身可用于执行同步。 在对 pthread_cond_wait()、pthread_cond_timedwait()、pthread_cond_signal()、pthread_cond_broadcast() 和 pthread_cond_destroy() 的调用中引用 cond 副本的结果是未定义的。
2、尝试去初始化一个已经初始化的条件变量,结果是未定义的。
(6)宏
|--------|-------------------------------------------------|
| 名称 | 描述 |
| EAGAIN | 系统缺少初始化另一个条件变量所需的资源(内存除外)。 |
| ENOMEM | 内存不足,无法初始化条件变量。 |
| EBUSY | 该实现检测到尝试重新初始化 cond 引用的对象,cond 是以前初始化但尚未销毁的条件变量。 |
| EINVAL | 指定的__cond_attr值无效。 |
由于篇幅有限,条件变量的其他函数介绍将在下一章中体现,感觉像是到达CSDN的发布文章字数限制了,之前写的条件变量等待函数都被回退到历史版本了。
四、队列测试验证
1、int类型
实现内容为:多个生产者和消费者线程同时操作队列,从中放入数据和拿出数据。10个消费者、10个生产者,每个生产者生成20个数据,每个生产者线程分别生产[0-20),[20-40),[40-60),后面以此类推,我们可以看最后的数据如果是0-199不重复的200个数,说明我们实现的没有问题。
我这边直接把互斥锁和条件变量嵌入到队列相关函数中了,这样后续实现线程池或者进程池时,可以不考虑互斥锁和条件变量相关的问题,使用上会方便很多。
(1)Demo
cpp
#include "SqQueue.h"
#define TEST_CONSUMER_THREAD_NUM 10
#define TEST_PRODUCER_THREAD_NUM 10
#define TEST_INTERVAL_VAL 20
#define PRODUCER_SUM_VAL (TEST_PRODUCER_THREAD_NUM * TEST_INTERVAL_VAL)
#define CONSUMER_VAL (PRODUCER_SUM_VAL / TEST_CONSUMER_THREAD_NUM)
#define QUEUE_LEN 100
#define GLOBAL_ARRAY_COL_NUM 2
#define GLOBAL_ARRAY_ROW_NUM TEST_PRODUCER_THREAD_NUM
int GlobalArray[GLOBAL_ARRAY_ROW_NUM][GLOBAL_ARRAY_COL_NUM];
typedef struct OneTaskSt
{
SqQueue *Queue;
int AccessIndex;
OneThrdMutexSt *Mutex;
}OneTaskSt;
void* Producer(void* Arg)
{
int i;
int Idx;
OneTaskSt *Task = (OneTaskSt *)Arg;
THRD_MUTEX_LOCK_F(Task->Mutex);
Idx = Task->AccessIndex;
Task->AccessIndex++;
THRD_MUTEX_UNLOCK_F(Task->Mutex);
for ( i = GlobalArray[Idx][0]; i < GlobalArray[Idx][1]; i++)
{
EnterSqQueue(Task->Queue, &i);
LogFormat(Info,"Producer : OK, Val : %d.\n",i);
}
THRD_EXIT(SUCCESS_FLAG);
}
void* Consumer(void* Arg)
{
int Val;
int Cnt = 0;
OneTaskSt *Task = (OneTaskSt *)Arg;
while(Cnt != CONSUMER_VAL)
{
if(LeaveSqQueue(Task->Queue, &Val) != SUCCESS_FLAG)
{
continue;
}
LogFormat(Info,"Consumer : OK, Val : %d.\n",Val);
Cnt++;
}
THRD_EXIT(SUCCESS_FLAG);
}
Status main()
{
int i;
void *ThrdExitState = NULL;
OneTaskSt Task;
OneThrdSt **ConsumerArray = (OneThrdSt **)MyMalloc(sizeof(OneThrdSt *) * TEST_CONSUMER_THREAD_NUM);
OneThrdSt **ProducerArray = (OneThrdSt **)MyMalloc(sizeof(OneThrdSt *) * TEST_PRODUCER_THREAD_NUM);
InitAllSqQueue(&(Task.Queue),
QUEUE_LEN,
INT_TYPE_FLAG,
PTHREAD_PROCESS_PRIVATE,
PTHREAD_MUTEX_ERRORCHECK,
PTHREAD_MUTEX_STALLED,
2,
10000,
CLOCK_REALTIME);
OneThrdMutexCreate(&(Task.Mutex),
PTHREAD_PROCESS_PRIVATE,
PTHREAD_MUTEX_ERRORCHECK,
PTHREAD_MUTEX_STALLED,
2,
1);
Task.AccessIndex = 0;
for ( i = 0; i < GLOBAL_ARRAY_ROW_NUM; i++)
{
GlobalArray[i][0] = i * TEST_INTERVAL_VAL;
GlobalArray[i][1] = GlobalArray[i][0] + TEST_INTERVAL_VAL;
}
for ( i = 0; i < TEST_PRODUCER_THREAD_NUM; i++)
{
OneThrdCreate(&(ProducerArray[i]),
PTHREAD_CREATE_JOINABLE,
PTHREAD_STACK_MIN,
ONE_PAGE_MEM_SIZE,
Producer,
&Task);
}
for ( i = 0; i < TEST_CONSUMER_THREAD_NUM; i++)
{
OneThrdCreate(&(ConsumerArray[i]),
PTHREAD_CREATE_JOINABLE,
PTHREAD_STACK_MIN,
ONE_PAGE_MEM_SIZE,
Consumer,
&Task);
}
for ( i = 0; i < TEST_PRODUCER_THREAD_NUM; i++)
{
ThrdWait(ProducerArray[i]->ThreadId, &ThrdExitState);
LogFormat(Debug,"ThrdExitState : %ld.\n",(long)ThrdExitState);
OneThrdFree(&(ProducerArray[i]));
}
for ( i = 0; i < TEST_CONSUMER_THREAD_NUM; i++)
{
ThrdWait(ConsumerArray[i]->ThreadId, &ThrdExitState);
LogFormat(Debug,"ThrdExitState : %ld.\n",(long)ThrdExitState);
OneThrdFree(&(ConsumerArray[i]));
}
free(ConsumerArray);
ConsumerArray = NULL;
free(ProducerArray);
ProducerArray = NULL;
PrintfSqQueue(Task.Queue, Debug);
DestroySqQueue(&(Task.Queue));
OneThrdMutexFree(&(Task.Mutex));
return SUCCESS_FLAG;
}
(2)编译
bash
[gbase@czg2 SqQueue]$ make clean
rm -rf TestSqQueue
rm -rf TestThreadQ
[gbase@czg2 SqQueue]$ make
gcc -Wall -Wextra -O3 -std=gnu11 TestThreadQ.c -o TestThreadQ -I /opt/Developer/ComputerLanguageStudy/C/DataStructureTestSrc/PublicFunction/ -I /opt/Developer/ComputerLanguageStudy/C/DataStructureTestSrc/Log/ -I /opt/Developer/ComputerLanguageStudy/C/DataStructureTestSrc/PublicFunction/Pthread/ -L /opt/Developer/ComputerLanguageStudy/C/DataStructureTestSrc/PublicFunction/Make/Libs/ -L /usr/lib64/ -l PublicFunction -l Log -l MyThread -l SqQueue
gcc -Wall -Wextra -O3 -std=gnu11 main.c -o TestSqQueue -I /opt/Developer/ComputerLanguageStudy/C/DataStructureTestSrc/PublicFunction/ -I /opt/Developer/ComputerLanguageStudy/C/DataStructureTestSrc/Log/ -I /opt/Developer/ComputerLanguageStudy/C/DataStructureTestSrc/PublicFunction/Pthread/ -L /opt/Developer/ComputerLanguageStudy/C/DataStructureTestSrc/PublicFunction/Make/Libs/ -L /usr/lib64/ -l PublicFunction -l Log -l MyThread -l SqQueue
(3)验证
消费者和生产者分别拿到了0-199,没有重复消费、多消费、少消费的情况发生,说明我们实现的正确。
bash
[gbase@czg2 SqQueue]$ ./TestThreadQ |sort -t ":" -k 5 -n
2024-04-08 10:03:10-P[45227]-T[45231]-[Info ]-Producer : OK, Val : 0.
2024-04-08 10:03:10-P[45227]-T[45241]-[Info ]-Consumer : OK, Val : 0.
2024-04-08 10:03:10-P[45227]-T[45231]-[Info ]-Producer : OK, Val : 1.
2024-04-08 10:03:10-P[45227]-T[45243]-[Info ]-Consumer : OK, Val : 1.
2024-04-08 10:03:10-P[45227]-T[45231]-[Info ]-Producer : OK, Val : 2.
2024-04-08 10:03:10-P[45227]-T[45243]-[Info ]-Consumer : OK, Val : 2.
2024-04-08 10:03:10-P[45227]-T[45231]-[Info ]-Producer : OK, Val : 3.
2024-04-08 10:03:10-P[45227]-T[45243]-[Info ]-Consumer : OK, Val : 3.
2024-04-08 10:03:10-P[45227]-T[45231]-[Info ]-Producer : OK, Val : 4.
2024-04-08 10:03:10-P[45227]-T[45243]-[Info ]-Consumer : OK, Val : 4.
2024-04-08 10:03:10-P[45227]-T[45231]-[Info ]-Producer : OK, Val : 5.
2024-04-08 10:03:10-P[45227]-T[45243]-[Info ]-Consumer : OK, Val : 5.
2024-04-08 10:03:10-P[45227]-T[45231]-[Info ]-Producer : OK, Val : 6.
2024-04-08 10:03:10-P[45227]-T[45243]-[Info ]-Consumer : OK, Val : 6.
2024-04-08 10:03:10-P[45227]-T[45231]-[Info ]-Producer : OK, Val : 7.
2024-04-08 10:03:10-P[45227]-T[45243]-[Info ]-Consumer : OK, Val : 7.
2024-04-08 10:03:10-P[45227]-T[45231]-[Info ]-Producer : OK, Val : 8.
2024-04-08 10:03:10-P[45227]-T[45243]-[Info ]-Consumer : OK, Val : 8.
2024-04-08 10:03:10-P[45227]-T[45231]-[Info ]-Producer : OK, Val : 9.
2024-04-08 10:03:10-P[45227]-T[45243]-[Info ]-Consumer : OK, Val : 9.
2024-04-08 10:03:10-P[45227]-T[45231]-[Info ]-Producer : OK, Val : 10.
2024-04-08 10:03:10-P[45227]-T[45244]-[Info ]-Consumer : OK, Val : 10.
2024-04-08 10:03:10-P[45227]-T[45231]-[Info ]-Producer : OK, Val : 11.
2024-04-08 10:03:10-P[45227]-T[45245]-[Info ]-Consumer : OK, Val : 11.
2024-04-08 10:03:10-P[45227]-T[45231]-[Info ]-Producer : OK, Val : 12.
2024-04-08 10:03:10-P[45227]-T[45242]-[Info ]-Consumer : OK, Val : 12.
2024-04-08 10:03:10-P[45227]-T[45231]-[Info ]-Producer : OK, Val : 13.
2024-04-08 10:03:10-P[45227]-T[45246]-[Info ]-Consumer : OK, Val : 13.
2024-04-08 10:03:10-P[45227]-T[45231]-[Info ]-Producer : OK, Val : 14.
2024-04-08 10:03:10-P[45227]-T[45239]-[Info ]-Consumer : OK, Val : 14.
2024-04-08 10:03:10-P[45227]-T[45231]-[Info ]-Producer : OK, Val : 15.
2024-04-08 10:03:10-P[45227]-T[45240]-[Info ]-Consumer : OK, Val : 15.
2024-04-08 10:03:10-P[45227]-T[45231]-[Info ]-Producer : OK, Val : 16.
2024-04-08 10:03:10-P[45227]-T[45241]-[Info ]-Consumer : OK, Val : 16.
2024-04-08 10:03:10-P[45227]-T[45231]-[Info ]-Producer : OK, Val : 17.
2024-04-08 10:03:10-P[45227]-T[45247]-[Info ]-Consumer : OK, Val : 17.
2024-04-08 10:03:10-P[45227]-T[45231]-[Info ]-Producer : OK, Val : 18.
2024-04-08 10:03:10-P[45227]-T[45248]-[Info ]-Consumer : OK, Val : 18.
2024-04-08 10:03:10-P[45227]-T[45231]-[Info ]-Producer : OK, Val : 19.
2024-04-08 10:03:10-P[45227]-T[45241]-[Info ]-Consumer : OK, Val : 19.
2024-04-08 10:03:10-P[45227]-T[45229]-[Info ]-Producer : OK, Val : 20.
2024-04-08 10:03:10-P[45227]-T[45241]-[Info ]-Consumer : OK, Val : 20.
2024-04-08 10:03:10-P[45227]-T[45229]-[Info ]-Producer : OK, Val : 21.
2024-04-08 10:03:10-P[45227]-T[45241]-[Info ]-Consumer : OK, Val : 21.
2024-04-08 10:03:10-P[45227]-T[45229]-[Info ]-Producer : OK, Val : 22.
2024-04-08 10:03:10-P[45227]-T[45241]-[Info ]-Consumer : OK, Val : 22.
2024-04-08 10:03:10-P[45227]-T[45229]-[Info ]-Producer : OK, Val : 23.
2024-04-08 10:03:10-P[45227]-T[45241]-[Info ]-Consumer : OK, Val : 23.
2024-04-08 10:03:10-P[45227]-T[45229]-[Info ]-Producer : OK, Val : 24.
2024-04-08 10:03:10-P[45227]-T[45241]-[Info ]-Consumer : OK, Val : 24.
2024-04-08 10:03:10-P[45227]-T[45229]-[Info ]-Producer : OK, Val : 25.
2024-04-08 10:03:10-P[45227]-T[45241]-[Info ]-Consumer : OK, Val : 25.
2024-04-08 10:03:10-P[45227]-T[45229]-[Info ]-Producer : OK, Val : 26.
2024-04-08 10:03:10-P[45227]-T[45241]-[Info ]-Consumer : OK, Val : 26.
2024-04-08 10:03:10-P[45227]-T[45229]-[Info ]-Producer : OK, Val : 27.
2024-04-08 10:03:10-P[45227]-T[45241]-[Info ]-Consumer : OK, Val : 27.
2024-04-08 10:03:10-P[45227]-T[45229]-[Info ]-Producer : OK, Val : 28.
2024-04-08 10:03:10-P[45227]-T[45241]-[Info ]-Consumer : OK, Val : 28.
2024-04-08 10:03:10-P[45227]-T[45229]-[Info ]-Producer : OK, Val : 29.
2024-04-08 10:03:10-P[45227]-T[45243]-[Info ]-Consumer : OK, Val : 29.
2024-04-08 10:03:10-P[45227]-T[45229]-[Info ]-Producer : OK, Val : 30.
2024-04-08 10:03:10-P[45227]-T[45243]-[Info ]-Consumer : OK, Val : 30.
2024-04-08 10:03:10-P[45227]-T[45229]-[Info ]-Producer : OK, Val : 31.
2024-04-08 10:03:10-P[45227]-T[45243]-[Info ]-Consumer : OK, Val : 31.
2024-04-08 10:03:10-P[45227]-T[45229]-[Info ]-Producer : OK, Val : 32.
2024-04-08 10:03:10-P[45227]-T[45243]-[Info ]-Consumer : OK, Val : 32.
2024-04-08 10:03:10-P[45227]-T[45229]-[Info ]-Producer : OK, Val : 33.
2024-04-08 10:03:10-P[45227]-T[45243]-[Info ]-Consumer : OK, Val : 33.
2024-04-08 10:03:10-P[45227]-T[45229]-[Info ]-Producer : OK, Val : 34.
2024-04-08 10:03:10-P[45227]-T[45243]-[Info ]-Consumer : OK, Val : 34.
2024-04-08 10:03:10-P[45227]-T[45229]-[Info ]-Producer : OK, Val : 35.
2024-04-08 10:03:10-P[45227]-T[45243]-[Info ]-Consumer : OK, Val : 35.
2024-04-08 10:03:10-P[45227]-T[45229]-[Info ]-Producer : OK, Val : 36.
2024-04-08 10:03:10-P[45227]-T[45243]-[Info ]-Consumer : OK, Val : 36.
2024-04-08 10:03:10-P[45227]-T[45229]-[Info ]-Producer : OK, Val : 37.
2024-04-08 10:03:10-P[45227]-T[45243]-[Info ]-Consumer : OK, Val : 37.
2024-04-08 10:03:10-P[45227]-T[45229]-[Info ]-Producer : OK, Val : 38.
2024-04-08 10:03:10-P[45227]-T[45243]-[Info ]-Consumer : OK, Val : 38.
2024-04-08 10:03:10-P[45227]-T[45229]-[Info ]-Producer : OK, Val : 39.
2024-04-08 10:03:10-P[45227]-T[45243]-[Info ]-Consumer : OK, Val : 39.
2024-04-08 10:03:10-P[45227]-T[45233]-[Info ]-Producer : OK, Val : 40.
2024-04-08 10:03:10-P[45227]-T[45241]-[Info ]-Consumer : OK, Val : 40.
2024-04-08 10:03:10-P[45227]-T[45233]-[Info ]-Producer : OK, Val : 41.
2024-04-08 10:03:10-P[45227]-T[45245]-[Info ]-Consumer : OK, Val : 41.
2024-04-08 10:03:10-P[45227]-T[45233]-[Info ]-Producer : OK, Val : 42.
2024-04-08 10:03:10-P[45227]-T[45245]-[Info ]-Consumer : OK, Val : 42.
2024-04-08 10:03:10-P[45227]-T[45233]-[Info ]-Producer : OK, Val : 43.
2024-04-08 10:03:10-P[45227]-T[45242]-[Info ]-Consumer : OK, Val : 43.
2024-04-08 10:03:10-P[45227]-T[45233]-[Info ]-Producer : OK, Val : 44.
2024-04-08 10:03:10-P[45227]-T[45242]-[Info ]-Consumer : OK, Val : 44.
2024-04-08 10:03:10-P[45227]-T[45233]-[Info ]-Producer : OK, Val : 45.
2024-04-08 10:03:10-P[45227]-T[45244]-[Info ]-Consumer : OK, Val : 45.
2024-04-08 10:03:10-P[45227]-T[45233]-[Info ]-Producer : OK, Val : 46.
2024-04-08 10:03:10-P[45227]-T[45245]-[Info ]-Consumer : OK, Val : 46.
2024-04-08 10:03:10-P[45227]-T[45233]-[Info ]-Producer : OK, Val : 47.
2024-04-08 10:03:10-P[45227]-T[45242]-[Info ]-Consumer : OK, Val : 47.
2024-04-08 10:03:10-P[45227]-T[45233]-[Info ]-Producer : OK, Val : 48.
2024-04-08 10:03:10-P[45227]-T[45242]-[Info ]-Consumer : OK, Val : 48.
2024-04-08 10:03:10-P[45227]-T[45233]-[Info ]-Producer : OK, Val : 49.
2024-04-08 10:03:10-P[45227]-T[45242]-[Info ]-Consumer : OK, Val : 49.
2024-04-08 10:03:10-P[45227]-T[45233]-[Info ]-Producer : OK, Val : 50.
2024-04-08 10:03:10-P[45227]-T[45242]-[Info ]-Consumer : OK, Val : 50.
2024-04-08 10:03:10-P[45227]-T[45233]-[Info ]-Producer : OK, Val : 51.
2024-04-08 10:03:10-P[45227]-T[45242]-[Info ]-Consumer : OK, Val : 51.
2024-04-08 10:03:10-P[45227]-T[45233]-[Info ]-Producer : OK, Val : 52.
2024-04-08 10:03:10-P[45227]-T[45242]-[Info ]-Consumer : OK, Val : 52.
2024-04-08 10:03:10-P[45227]-T[45233]-[Info ]-Producer : OK, Val : 53.
2024-04-08 10:03:10-P[45227]-T[45242]-[Info ]-Consumer : OK, Val : 53.
2024-04-08 10:03:10-P[45227]-T[45233]-[Info ]-Producer : OK, Val : 54.
2024-04-08 10:03:10-P[45227]-T[45245]-[Info ]-Consumer : OK, Val : 54.
2024-04-08 10:03:10-P[45227]-T[45233]-[Info ]-Producer : OK, Val : 55.
2024-04-08 10:03:10-P[45227]-T[45245]-[Info ]-Consumer : OK, Val : 55.
2024-04-08 10:03:10-P[45227]-T[45233]-[Info ]-Producer : OK, Val : 56.
2024-04-08 10:03:10-P[45227]-T[45244]-[Info ]-Consumer : OK, Val : 56.
2024-04-08 10:03:10-P[45227]-T[45233]-[Info ]-Producer : OK, Val : 57.
2024-04-08 10:03:10-P[45227]-T[45244]-[Info ]-Consumer : OK, Val : 57.
2024-04-08 10:03:10-P[45227]-T[45233]-[Info ]-Producer : OK, Val : 58.
2024-04-08 10:03:10-P[45227]-T[45244]-[Info ]-Consumer : OK, Val : 58.
2024-04-08 10:03:10-P[45227]-T[45233]-[Info ]-Producer : OK, Val : 59.
2024-04-08 10:03:10-P[45227]-T[45244]-[Info ]-Consumer : OK, Val : 59.
2024-04-08 10:03:10-P[45227]-T[45235]-[Info ]-Producer : OK, Val : 60.
2024-04-08 10:03:10-P[45227]-T[45241]-[Info ]-Consumer : OK, Val : 60.
2024-04-08 10:03:10-P[45227]-T[45235]-[Info ]-Producer : OK, Val : 61.
2024-04-08 10:03:10-P[45227]-T[45241]-[Info ]-Consumer : OK, Val : 61.
2024-04-08 10:03:10-P[45227]-T[45235]-[Info ]-Producer : OK, Val : 62.
2024-04-08 10:03:10-P[45227]-T[45241]-[Info ]-Consumer : OK, Val : 62.
2024-04-08 10:03:10-P[45227]-T[45235]-[Info ]-Producer : OK, Val : 63.
2024-04-08 10:03:10-P[45227]-T[45241]-[Info ]-Consumer : OK, Val : 63.
2024-04-08 10:03:10-P[45227]-T[45235]-[Info ]-Producer : OK, Val : 64.
2024-04-08 10:03:10-P[45227]-T[45241]-[Info ]-Consumer : OK, Val : 64.
2024-04-08 10:03:10-P[45227]-T[45235]-[Info ]-Producer : OK, Val : 65.
2024-04-08 10:03:10-P[45227]-T[45241]-[Info ]-Consumer : OK, Val : 65.
2024-04-08 10:03:10-P[45227]-T[45235]-[Info ]-Producer : OK, Val : 66.
2024-04-08 10:03:10-P[45227]-T[45241]-[Info ]-Consumer : OK, Val : 66.
2024-04-08 10:03:10-P[45227]-T[45235]-[Info ]-Producer : OK, Val : 67.
2024-04-08 10:03:10-P[45227]-T[45242]-[Info ]-Consumer : OK, Val : 67.
2024-04-08 10:03:10-P[45227]-T[45235]-[Info ]-Producer : OK, Val : 68.
2024-04-08 10:03:10-P[45227]-T[45242]-[Info ]-Consumer : OK, Val : 68.
2024-04-08 10:03:10-P[45227]-T[45235]-[Info ]-Producer : OK, Val : 69.
2024-04-08 10:03:10-P[45227]-T[45242]-[Info ]-Consumer : OK, Val : 69.
2024-04-08 10:03:10-P[45227]-T[45235]-[Info ]-Producer : OK, Val : 70.
2024-04-08 10:03:10-P[45227]-T[45242]-[Info ]-Consumer : OK, Val : 70.
2024-04-08 10:03:10-P[45227]-T[45235]-[Info ]-Producer : OK, Val : 71.
2024-04-08 10:03:10-P[45227]-T[45242]-[Info ]-Consumer : OK, Val : 71.
2024-04-08 10:03:10-P[45227]-T[45235]-[Info ]-Producer : OK, Val : 72.
2024-04-08 10:03:10-P[45227]-T[45242]-[Info ]-Consumer : OK, Val : 72.
2024-04-08 10:03:10-P[45227]-T[45235]-[Info ]-Producer : OK, Val : 73.
2024-04-08 10:03:10-P[45227]-T[45242]-[Info ]-Consumer : OK, Val : 73.
2024-04-08 10:03:10-P[45227]-T[45235]-[Info ]-Producer : OK, Val : 74.
2024-04-08 10:03:10-P[45227]-T[45242]-[Info ]-Consumer : OK, Val : 74.
2024-04-08 10:03:10-P[45227]-T[45235]-[Info ]-Producer : OK, Val : 75.
2024-04-08 10:03:10-P[45227]-T[45244]-[Info ]-Consumer : OK, Val : 75.
2024-04-08 10:03:10-P[45227]-T[45235]-[Info ]-Producer : OK, Val : 76.
2024-04-08 10:03:10-P[45227]-T[45244]-[Info ]-Consumer : OK, Val : 76.
2024-04-08 10:03:10-P[45227]-T[45235]-[Info ]-Producer : OK, Val : 77.
2024-04-08 10:03:10-P[45227]-T[45244]-[Info ]-Consumer : OK, Val : 77.
2024-04-08 10:03:10-P[45227]-T[45235]-[Info ]-Producer : OK, Val : 78.
2024-04-08 10:03:10-P[45227]-T[45244]-[Info ]-Consumer : OK, Val : 78.
2024-04-08 10:03:10-P[45227]-T[45235]-[Info ]-Producer : OK, Val : 79.
2024-04-08 10:03:10-P[45227]-T[45244]-[Info ]-Consumer : OK, Val : 79.
2024-04-08 10:03:10-P[45227]-T[45232]-[Info ]-Producer : OK, Val : 80.
2024-04-08 10:03:10-P[45227]-T[45244]-[Info ]-Consumer : OK, Val : 80.
2024-04-08 10:03:10-P[45227]-T[45232]-[Info ]-Producer : OK, Val : 81.
2024-04-08 10:03:10-P[45227]-T[45244]-[Info ]-Consumer : OK, Val : 81.
2024-04-08 10:03:10-P[45227]-T[45232]-[Info ]-Producer : OK, Val : 82.
2024-04-08 10:03:10-P[45227]-T[45244]-[Info ]-Consumer : OK, Val : 82.
2024-04-08 10:03:10-P[45227]-T[45232]-[Info ]-Producer : OK, Val : 83.
2024-04-08 10:03:10-P[45227]-T[45244]-[Info ]-Consumer : OK, Val : 83.
2024-04-08 10:03:10-P[45227]-T[45232]-[Info ]-Producer : OK, Val : 84.
2024-04-08 10:03:10-P[45227]-T[45244]-[Info ]-Consumer : OK, Val : 84.
2024-04-08 10:03:10-P[45227]-T[45232]-[Info ]-Producer : OK, Val : 85.
2024-04-08 10:03:10-P[45227]-T[45245]-[Info ]-Consumer : OK, Val : 85.
2024-04-08 10:03:10-P[45227]-T[45232]-[Info ]-Producer : OK, Val : 86.
2024-04-08 10:03:10-P[45227]-T[45244]-[Info ]-Consumer : OK, Val : 86.
2024-04-08 10:03:10-P[45227]-T[45232]-[Info ]-Producer : OK, Val : 87.
2024-04-08 10:03:10-P[45227]-T[45244]-[Info ]-Consumer : OK, Val : 87.
2024-04-08 10:03:10-P[45227]-T[45232]-[Info ]-Producer : OK, Val : 88.
2024-04-08 10:03:10-P[45227]-T[45245]-[Info ]-Consumer : OK, Val : 88.
2024-04-08 10:03:10-P[45227]-T[45232]-[Info ]-Producer : OK, Val : 89.
2024-04-08 10:03:10-P[45227]-T[45245]-[Info ]-Consumer : OK, Val : 89.
2024-04-08 10:03:10-P[45227]-T[45232]-[Info ]-Producer : OK, Val : 90.
2024-04-08 10:03:10-P[45227]-T[45245]-[Info ]-Consumer : OK, Val : 90.
2024-04-08 10:03:10-P[45227]-T[45232]-[Info ]-Producer : OK, Val : 91.
2024-04-08 10:03:10-P[45227]-T[45245]-[Info ]-Consumer : OK, Val : 91.
2024-04-08 10:03:10-P[45227]-T[45232]-[Info ]-Producer : OK, Val : 92.
2024-04-08 10:03:10-P[45227]-T[45245]-[Info ]-Consumer : OK, Val : 92.
2024-04-08 10:03:10-P[45227]-T[45232]-[Info ]-Producer : OK, Val : 93.
2024-04-08 10:03:10-P[45227]-T[45245]-[Info ]-Consumer : OK, Val : 93.
2024-04-08 10:03:10-P[45227]-T[45232]-[Info ]-Producer : OK, Val : 94.
2024-04-08 10:03:10-P[45227]-T[45245]-[Info ]-Consumer : OK, Val : 94.
2024-04-08 10:03:10-P[45227]-T[45232]-[Info ]-Producer : OK, Val : 95.
2024-04-08 10:03:10-P[45227]-T[45245]-[Info ]-Consumer : OK, Val : 95.
2024-04-08 10:03:10-P[45227]-T[45232]-[Info ]-Producer : OK, Val : 96.
2024-04-08 10:03:10-P[45227]-T[45245]-[Info ]-Consumer : OK, Val : 96.
2024-04-08 10:03:10-P[45227]-T[45232]-[Info ]-Producer : OK, Val : 97.
2024-04-08 10:03:10-P[45227]-T[45245]-[Info ]-Consumer : OK, Val : 97.
2024-04-08 10:03:10-P[45227]-T[45232]-[Info ]-Producer : OK, Val : 98.
2024-04-08 10:03:10-P[45227]-T[45245]-[Info ]-Consumer : OK, Val : 98.
2024-04-08 10:03:10-P[45227]-T[45232]-[Info ]-Producer : OK, Val : 99.
2024-04-08 10:03:10-P[45227]-T[45245]-[Info ]-Consumer : OK, Val : 99.
2024-04-08 10:03:10-P[45227]-T[45237]-[Info ]-Producer : OK, Val : 100.
2024-04-08 10:03:10-P[45227]-T[45244]-[Info ]-Consumer : OK, Val : 100.
2024-04-08 10:03:10-P[45227]-T[45237]-[Info ]-Producer : OK, Val : 101.
2024-04-08 10:03:10-P[45227]-T[45248]-[Info ]-Consumer : OK, Val : 101.
2024-04-08 10:03:10-P[45227]-T[45237]-[Info ]-Producer : OK, Val : 102.
2024-04-08 10:03:10-P[45227]-T[45248]-[Info ]-Consumer : OK, Val : 102.
2024-04-08 10:03:10-P[45227]-T[45237]-[Info ]-Producer : OK, Val : 103.
2024-04-08 10:03:10-P[45227]-T[45248]-[Info ]-Consumer : OK, Val : 103.
2024-04-08 10:03:10-P[45227]-T[45237]-[Info ]-Producer : OK, Val : 104.
2024-04-08 10:03:10-P[45227]-T[45248]-[Info ]-Consumer : OK, Val : 104.
2024-04-08 10:03:10-P[45227]-T[45237]-[Info ]-Producer : OK, Val : 105.
2024-04-08 10:03:10-P[45227]-T[45248]-[Info ]-Consumer : OK, Val : 105.
2024-04-08 10:03:10-P[45227]-T[45237]-[Info ]-Producer : OK, Val : 106.
2024-04-08 10:03:10-P[45227]-T[45248]-[Info ]-Consumer : OK, Val : 106.
2024-04-08 10:03:10-P[45227]-T[45237]-[Info ]-Producer : OK, Val : 107.
2024-04-08 10:03:10-P[45227]-T[45248]-[Info ]-Consumer : OK, Val : 107.
2024-04-08 10:03:10-P[45227]-T[45237]-[Info ]-Producer : OK, Val : 108.
2024-04-08 10:03:10-P[45227]-T[45248]-[Info ]-Consumer : OK, Val : 108.
2024-04-08 10:03:10-P[45227]-T[45237]-[Info ]-Producer : OK, Val : 109.
2024-04-08 10:03:10-P[45227]-T[45248]-[Info ]-Consumer : OK, Val : 109.
2024-04-08 10:03:10-P[45227]-T[45237]-[Info ]-Producer : OK, Val : 110.
2024-04-08 10:03:10-P[45227]-T[45246]-[Info ]-Consumer : OK, Val : 110.
2024-04-08 10:03:10-P[45227]-T[45237]-[Info ]-Producer : OK, Val : 111.
2024-04-08 10:03:10-P[45227]-T[45246]-[Info ]-Consumer : OK, Val : 111.
2024-04-08 10:03:10-P[45227]-T[45237]-[Info ]-Producer : OK, Val : 112.
2024-04-08 10:03:10-P[45227]-T[45246]-[Info ]-Consumer : OK, Val : 112.
2024-04-08 10:03:10-P[45227]-T[45237]-[Info ]-Producer : OK, Val : 113.
2024-04-08 10:03:10-P[45227]-T[45246]-[Info ]-Consumer : OK, Val : 113.
2024-04-08 10:03:10-P[45227]-T[45237]-[Info ]-Producer : OK, Val : 114.
2024-04-08 10:03:10-P[45227]-T[45246]-[Info ]-Consumer : OK, Val : 114.
2024-04-08 10:03:10-P[45227]-T[45237]-[Info ]-Producer : OK, Val : 115.
2024-04-08 10:03:10-P[45227]-T[45246]-[Info ]-Consumer : OK, Val : 115.
2024-04-08 10:03:10-P[45227]-T[45237]-[Info ]-Producer : OK, Val : 116.
2024-04-08 10:03:10-P[45227]-T[45246]-[Info ]-Consumer : OK, Val : 116.
2024-04-08 10:03:10-P[45227]-T[45237]-[Info ]-Producer : OK, Val : 117.
2024-04-08 10:03:10-P[45227]-T[45246]-[Info ]-Consumer : OK, Val : 117.
2024-04-08 10:03:10-P[45227]-T[45237]-[Info ]-Producer : OK, Val : 118.
2024-04-08 10:03:10-P[45227]-T[45246]-[Info ]-Consumer : OK, Val : 118.
2024-04-08 10:03:10-P[45227]-T[45237]-[Info ]-Producer : OK, Val : 119.
2024-04-08 10:03:10-P[45227]-T[45246]-[Info ]-Consumer : OK, Val : 119.
2024-04-08 10:03:10-P[45227]-T[45238]-[Info ]-Producer : OK, Val : 120.
2024-04-08 10:03:10-P[45227]-T[45244]-[Info ]-Consumer : OK, Val : 120.
2024-04-08 10:03:10-P[45227]-T[45238]-[Info ]-Producer : OK, Val : 121.
2024-04-08 10:03:10-P[45227]-T[45248]-[Info ]-Consumer : OK, Val : 121.
2024-04-08 10:03:10-P[45227]-T[45238]-[Info ]-Producer : OK, Val : 122.
2024-04-08 10:03:10-P[45227]-T[45248]-[Info ]-Consumer : OK, Val : 122.
2024-04-08 10:03:10-P[45227]-T[45238]-[Info ]-Producer : OK, Val : 123.
2024-04-08 10:03:10-P[45227]-T[45248]-[Info ]-Consumer : OK, Val : 123.
2024-04-08 10:03:10-P[45227]-T[45238]-[Info ]-Producer : OK, Val : 124.
2024-04-08 10:03:10-P[45227]-T[45248]-[Info ]-Consumer : OK, Val : 124.
2024-04-08 10:03:10-P[45227]-T[45238]-[Info ]-Producer : OK, Val : 125.
2024-04-08 10:03:10-P[45227]-T[45248]-[Info ]-Consumer : OK, Val : 125.
2024-04-08 10:03:10-P[45227]-T[45238]-[Info ]-Producer : OK, Val : 126.
2024-04-08 10:03:10-P[45227]-T[45248]-[Info ]-Consumer : OK, Val : 126.
2024-04-08 10:03:10-P[45227]-T[45238]-[Info ]-Producer : OK, Val : 127.
2024-04-08 10:03:10-P[45227]-T[45248]-[Info ]-Consumer : OK, Val : 127.
2024-04-08 10:03:10-P[45227]-T[45238]-[Info ]-Producer : OK, Val : 128.
2024-04-08 10:03:10-P[45227]-T[45248]-[Info ]-Consumer : OK, Val : 128.
2024-04-08 10:03:10-P[45227]-T[45238]-[Info ]-Producer : OK, Val : 129.
2024-04-08 10:03:10-P[45227]-T[45248]-[Info ]-Consumer : OK, Val : 129.
2024-04-08 10:03:10-P[45227]-T[45238]-[Info ]-Producer : OK, Val : 130.
2024-04-08 10:03:10-P[45227]-T[45248]-[Info ]-Consumer : OK, Val : 130.
2024-04-08 10:03:10-P[45227]-T[45238]-[Info ]-Producer : OK, Val : 131.
2024-04-08 10:03:10-P[45227]-T[45246]-[Info ]-Consumer : OK, Val : 131.
2024-04-08 10:03:10-P[45227]-T[45238]-[Info ]-Producer : OK, Val : 132.
2024-04-08 10:03:10-P[45227]-T[45246]-[Info ]-Consumer : OK, Val : 132.
2024-04-08 10:03:10-P[45227]-T[45238]-[Info ]-Producer : OK, Val : 133.
2024-04-08 10:03:10-P[45227]-T[45246]-[Info ]-Consumer : OK, Val : 133.
2024-04-08 10:03:10-P[45227]-T[45238]-[Info ]-Producer : OK, Val : 134.
2024-04-08 10:03:10-P[45227]-T[45246]-[Info ]-Consumer : OK, Val : 134.
2024-04-08 10:03:10-P[45227]-T[45238]-[Info ]-Producer : OK, Val : 135.
2024-04-08 10:03:10-P[45227]-T[45246]-[Info ]-Consumer : OK, Val : 135.
2024-04-08 10:03:10-P[45227]-T[45238]-[Info ]-Producer : OK, Val : 136.
2024-04-08 10:03:10-P[45227]-T[45246]-[Info ]-Consumer : OK, Val : 136.
2024-04-08 10:03:10-P[45227]-T[45238]-[Info ]-Producer : OK, Val : 137.
2024-04-08 10:03:10-P[45227]-T[45246]-[Info ]-Consumer : OK, Val : 137.
2024-04-08 10:03:10-P[45227]-T[45238]-[Info ]-Producer : OK, Val : 138.
2024-04-08 10:03:10-P[45227]-T[45246]-[Info ]-Consumer : OK, Val : 138.
2024-04-08 10:03:10-P[45227]-T[45238]-[Info ]-Producer : OK, Val : 139.
2024-04-08 10:03:10-P[45227]-T[45246]-[Info ]-Consumer : OK, Val : 139.
2024-04-08 10:03:10-P[45227]-T[45234]-[Info ]-Producer : OK, Val : 140.
2024-04-08 10:03:10-P[45227]-T[45242]-[Info ]-Consumer : OK, Val : 140.
2024-04-08 10:03:10-P[45227]-T[45234]-[Info ]-Producer : OK, Val : 141.
2024-04-08 10:03:10-P[45227]-T[45240]-[Info ]-Consumer : OK, Val : 141.
2024-04-08 10:03:10-P[45227]-T[45234]-[Info ]-Producer : OK, Val : 142.
2024-04-08 10:03:10-P[45227]-T[45240]-[Info ]-Consumer : OK, Val : 142.
2024-04-08 10:03:10-P[45227]-T[45234]-[Info ]-Producer : OK, Val : 143.
2024-04-08 10:03:10-P[45227]-T[45240]-[Info ]-Consumer : OK, Val : 143.
2024-04-08 10:03:10-P[45227]-T[45234]-[Info ]-Producer : OK, Val : 144.
2024-04-08 10:03:10-P[45227]-T[45240]-[Info ]-Consumer : OK, Val : 144.
2024-04-08 10:03:10-P[45227]-T[45234]-[Info ]-Producer : OK, Val : 145.
2024-04-08 10:03:10-P[45227]-T[45240]-[Info ]-Consumer : OK, Val : 145.
2024-04-08 10:03:10-P[45227]-T[45234]-[Info ]-Producer : OK, Val : 146.
2024-04-08 10:03:10-P[45227]-T[45240]-[Info ]-Consumer : OK, Val : 146.
2024-04-08 10:03:10-P[45227]-T[45234]-[Info ]-Producer : OK, Val : 147.
2024-04-08 10:03:10-P[45227]-T[45240]-[Info ]-Consumer : OK, Val : 147.
2024-04-08 10:03:10-P[45227]-T[45234]-[Info ]-Producer : OK, Val : 148.
2024-04-08 10:03:10-P[45227]-T[45240]-[Info ]-Consumer : OK, Val : 148.
2024-04-08 10:03:10-P[45227]-T[45234]-[Info ]-Producer : OK, Val : 149.
2024-04-08 10:03:10-P[45227]-T[45240]-[Info ]-Consumer : OK, Val : 149.
2024-04-08 10:03:10-P[45227]-T[45234]-[Info ]-Producer : OK, Val : 150.
2024-04-08 10:03:10-P[45227]-T[45240]-[Info ]-Consumer : OK, Val : 150.
2024-04-08 10:03:10-P[45227]-T[45234]-[Info ]-Producer : OK, Val : 151.
2024-04-08 10:03:10-P[45227]-T[45240]-[Info ]-Consumer : OK, Val : 151.
2024-04-08 10:03:10-P[45227]-T[45234]-[Info ]-Producer : OK, Val : 152.
2024-04-08 10:03:10-P[45227]-T[45240]-[Info ]-Consumer : OK, Val : 152.
2024-04-08 10:03:10-P[45227]-T[45234]-[Info ]-Producer : OK, Val : 153.
2024-04-08 10:03:10-P[45227]-T[45240]-[Info ]-Consumer : OK, Val : 153.
2024-04-08 10:03:10-P[45227]-T[45234]-[Info ]-Producer : OK, Val : 154.
2024-04-08 10:03:10-P[45227]-T[45240]-[Info ]-Consumer : OK, Val : 154.
2024-04-08 10:03:10-P[45227]-T[45234]-[Info ]-Producer : OK, Val : 155.
2024-04-08 10:03:10-P[45227]-T[45240]-[Info ]-Consumer : OK, Val : 155.
2024-04-08 10:03:10-P[45227]-T[45234]-[Info ]-Producer : OK, Val : 156.
2024-04-08 10:03:10-P[45227]-T[45240]-[Info ]-Consumer : OK, Val : 156.
2024-04-08 10:03:10-P[45227]-T[45234]-[Info ]-Producer : OK, Val : 157.
2024-04-08 10:03:10-P[45227]-T[45240]-[Info ]-Consumer : OK, Val : 157.
2024-04-08 10:03:10-P[45227]-T[45234]-[Info ]-Producer : OK, Val : 158.
2024-04-08 10:03:10-P[45227]-T[45240]-[Info ]-Consumer : OK, Val : 158.
2024-04-08 10:03:10-P[45227]-T[45234]-[Info ]-Producer : OK, Val : 159.
2024-04-08 10:03:10-P[45227]-T[45240]-[Info ]-Consumer : OK, Val : 159.
2024-04-08 10:03:10-P[45227]-T[45236]-[Info ]-Producer : OK, Val : 160.
2024-04-08 10:03:10-P[45227]-T[45242]-[Info ]-Consumer : OK, Val : 160.
2024-04-08 10:03:10-P[45227]-T[45236]-[Info ]-Producer : OK, Val : 161.
2024-04-08 10:03:10-P[45227]-T[45247]-[Info ]-Consumer : OK, Val : 161.
2024-04-08 10:03:10-P[45227]-T[45236]-[Info ]-Producer : OK, Val : 162.
2024-04-08 10:03:10-P[45227]-T[45247]-[Info ]-Consumer : OK, Val : 162.
2024-04-08 10:03:10-P[45227]-T[45236]-[Info ]-Producer : OK, Val : 163.
2024-04-08 10:03:10-P[45227]-T[45247]-[Info ]-Consumer : OK, Val : 163.
2024-04-08 10:03:10-P[45227]-T[45236]-[Info ]-Producer : OK, Val : 164.
2024-04-08 10:03:10-P[45227]-T[45247]-[Info ]-Consumer : OK, Val : 164.
2024-04-08 10:03:10-P[45227]-T[45236]-[Info ]-Producer : OK, Val : 165.
2024-04-08 10:03:10-P[45227]-T[45247]-[Info ]-Consumer : OK, Val : 165.
2024-04-08 10:03:10-P[45227]-T[45236]-[Info ]-Producer : OK, Val : 166.
2024-04-08 10:03:10-P[45227]-T[45247]-[Info ]-Consumer : OK, Val : 166.
2024-04-08 10:03:10-P[45227]-T[45236]-[Info ]-Producer : OK, Val : 167.
2024-04-08 10:03:10-P[45227]-T[45247]-[Info ]-Consumer : OK, Val : 167.
2024-04-08 10:03:10-P[45227]-T[45236]-[Info ]-Producer : OK, Val : 168.
2024-04-08 10:03:10-P[45227]-T[45247]-[Info ]-Consumer : OK, Val : 168.
2024-04-08 10:03:10-P[45227]-T[45236]-[Info ]-Producer : OK, Val : 169.
2024-04-08 10:03:10-P[45227]-T[45247]-[Info ]-Consumer : OK, Val : 169.
2024-04-08 10:03:10-P[45227]-T[45236]-[Info ]-Producer : OK, Val : 170.
2024-04-08 10:03:10-P[45227]-T[45247]-[Info ]-Consumer : OK, Val : 170.
2024-04-08 10:03:10-P[45227]-T[45236]-[Info ]-Producer : OK, Val : 171.
2024-04-08 10:03:10-P[45227]-T[45247]-[Info ]-Consumer : OK, Val : 171.
2024-04-08 10:03:10-P[45227]-T[45236]-[Info ]-Producer : OK, Val : 172.
2024-04-08 10:03:10-P[45227]-T[45247]-[Info ]-Consumer : OK, Val : 172.
2024-04-08 10:03:10-P[45227]-T[45236]-[Info ]-Producer : OK, Val : 173.
2024-04-08 10:03:10-P[45227]-T[45247]-[Info ]-Consumer : OK, Val : 173.
2024-04-08 10:03:10-P[45227]-T[45236]-[Info ]-Producer : OK, Val : 174.
2024-04-08 10:03:10-P[45227]-T[45247]-[Info ]-Consumer : OK, Val : 174.
2024-04-08 10:03:10-P[45227]-T[45236]-[Info ]-Producer : OK, Val : 175.
2024-04-08 10:03:10-P[45227]-T[45247]-[Info ]-Consumer : OK, Val : 175.
2024-04-08 10:03:10-P[45227]-T[45236]-[Info ]-Producer : OK, Val : 176.
2024-04-08 10:03:10-P[45227]-T[45247]-[Info ]-Consumer : OK, Val : 176.
2024-04-08 10:03:10-P[45227]-T[45236]-[Info ]-Producer : OK, Val : 177.
2024-04-08 10:03:10-P[45227]-T[45247]-[Info ]-Consumer : OK, Val : 177.
2024-04-08 10:03:10-P[45227]-T[45236]-[Info ]-Producer : OK, Val : 178.
2024-04-08 10:03:10-P[45227]-T[45247]-[Info ]-Consumer : OK, Val : 178.
2024-04-08 10:03:10-P[45227]-T[45236]-[Info ]-Producer : OK, Val : 179.
2024-04-08 10:03:10-P[45227]-T[45247]-[Info ]-Consumer : OK, Val : 179.
2024-04-08 10:03:10-P[45227]-T[45230]-[Info ]-Producer : OK, Val : 180.
2024-04-08 10:03:10-P[45227]-T[45245]-[Info ]-Consumer : OK, Val : 180.
2024-04-08 10:03:10-P[45227]-T[45230]-[Info ]-Producer : OK, Val : 181.
2024-04-08 10:03:10-P[45227]-T[45239]-[Info ]-Consumer : OK, Val : 181.
2024-04-08 10:03:10-P[45227]-T[45230]-[Info ]-Producer : OK, Val : 182.
2024-04-08 10:03:10-P[45227]-T[45239]-[Info ]-Consumer : OK, Val : 182.
2024-04-08 10:03:10-P[45227]-T[45230]-[Info ]-Producer : OK, Val : 183.
2024-04-08 10:03:10-P[45227]-T[45239]-[Info ]-Consumer : OK, Val : 183.
2024-04-08 10:03:10-P[45227]-T[45230]-[Info ]-Producer : OK, Val : 184.
2024-04-08 10:03:10-P[45227]-T[45239]-[Info ]-Consumer : OK, Val : 184.
2024-04-08 10:03:10-P[45227]-T[45230]-[Info ]-Producer : OK, Val : 185.
2024-04-08 10:03:10-P[45227]-T[45239]-[Info ]-Consumer : OK, Val : 185.
2024-04-08 10:03:10-P[45227]-T[45230]-[Info ]-Producer : OK, Val : 186.
2024-04-08 10:03:10-P[45227]-T[45239]-[Info ]-Consumer : OK, Val : 186.
2024-04-08 10:03:10-P[45227]-T[45230]-[Info ]-Producer : OK, Val : 187.
2024-04-08 10:03:10-P[45227]-T[45239]-[Info ]-Consumer : OK, Val : 187.
2024-04-08 10:03:10-P[45227]-T[45230]-[Info ]-Producer : OK, Val : 188.
2024-04-08 10:03:10-P[45227]-T[45239]-[Info ]-Consumer : OK, Val : 188.
2024-04-08 10:03:10-P[45227]-T[45230]-[Info ]-Producer : OK, Val : 189.
2024-04-08 10:03:10-P[45227]-T[45239]-[Info ]-Consumer : OK, Val : 189.
2024-04-08 10:03:10-P[45227]-T[45230]-[Info ]-Producer : OK, Val : 190.
2024-04-08 10:03:10-P[45227]-T[45239]-[Info ]-Consumer : OK, Val : 190.
2024-04-08 10:03:10-P[45227]-T[45230]-[Info ]-Producer : OK, Val : 191.
2024-04-08 10:03:10-P[45227]-T[45239]-[Info ]-Consumer : OK, Val : 191.
2024-04-08 10:03:10-P[45227]-T[45230]-[Info ]-Producer : OK, Val : 192.
2024-04-08 10:03:10-P[45227]-T[45239]-[Info ]-Consumer : OK, Val : 192.
2024-04-08 10:03:10-P[45227]-T[45230]-[Info ]-Producer : OK, Val : 193.
2024-04-08 10:03:10-P[45227]-T[45239]-[Info ]-Consumer : OK, Val : 193.
2024-04-08 10:03:10-P[45227]-T[45230]-[Info ]-Producer : OK, Val : 194.
2024-04-08 10:03:10-P[45227]-T[45239]-[Info ]-Consumer : OK, Val : 194.
2024-04-08 10:03:10-P[45227]-T[45230]-[Info ]-Producer : OK, Val : 195.
2024-04-08 10:03:10-P[45227]-T[45239]-[Info ]-Consumer : OK, Val : 195.
2024-04-08 10:03:10-P[45227]-T[45230]-[Info ]-Producer : OK, Val : 196.
2024-04-08 10:03:10-P[45227]-T[45239]-[Info ]-Consumer : OK, Val : 196.
2024-04-08 10:03:10-P[45227]-T[45230]-[Info ]-Producer : OK, Val : 197.
2024-04-08 10:03:10-P[45227]-T[45239]-[Info ]-Consumer : OK, Val : 197.
2024-04-08 10:03:10-P[45227]-T[45230]-[Info ]-Producer : OK, Val : 198.
2024-04-08 10:03:10-P[45227]-T[45239]-[Info ]-Consumer : OK, Val : 198.
2024-04-08 10:03:10-P[45227]-T[45230]-[Info ]-Producer : OK, Val : 199.
2024-04-08 10:03:10-P[45227]-T[45239]-[Info ]-Consumer : OK, Val : 199.
2、char[]类型
只是数字后面拼接了字符串。代码进行了些许调整。
(1)Demo
cpp
#include "SqQueue.h"
#define TEST_CONSUMER_THREAD_NUM 10
#define TEST_PRODUCER_THREAD_NUM 10
#define TEST_INTERVAL_VAL 20
#define PRODUCER_SUM_VAL (TEST_PRODUCER_THREAD_NUM * TEST_INTERVAL_VAL)
#define CONSUMER_VAL (PRODUCER_SUM_VAL / TEST_CONSUMER_THREAD_NUM)
#define TEST_STR_DATA_SUFFIX "I am a happy little angel. "
#define TEST_STR_DATA_PREFIX_LEN 100
#define QUEUE_LEN 8
#define GLOBAL_ARRAY_COL_NUM 2
#define GLOBAL_ARRAY_ROW_NUM TEST_PRODUCER_THREAD_NUM
int GlobalArray[GLOBAL_ARRAY_ROW_NUM][GLOBAL_ARRAY_COL_NUM];
typedef struct OneTaskSt
{
SqQueue *Queue;
int AccessIndex;
OneThrdMutexSt *Mutex;
}OneTaskSt;
void* Producer(void* Arg)
{
int i;
int Idx;
OneTaskSt *Task = (OneTaskSt *)Arg;
int TestDataLen = strlen(TEST_STR_DATA_SUFFIX);
char *TestData = (char*)MyMalloc(sizeof(char) * (TestDataLen + TEST_STR_DATA_PREFIX_LEN));
THRD_MUTEX_LOCK_F(Task->Mutex);
Idx = Task->AccessIndex;
Task->AccessIndex++;
THRD_MUTEX_UNLOCK_F(Task->Mutex);
for ( i = GlobalArray[Idx][0]; i < GlobalArray[Idx][1]; i++)
{
sprintf(TestData,"%d %s",i,TEST_STR_DATA_SUFFIX);
EnterSqQueue(Task->Queue, TestData);
LogFormat(Info,"Producer : OK, TestData : %s.\n",TestData);
}
free(TestData);
TestData = NULL;
THRD_EXIT(SUCCESS_FLAG);
}
void* Consumer(void* Arg)
{
int Cnt = 0;
int TestDataLen = strlen(TEST_STR_DATA_SUFFIX);
OneTaskSt *Task = (OneTaskSt *)Arg;
char *TestData = (char*)MyMalloc(sizeof(char) * (TestDataLen + TEST_STR_DATA_PREFIX_LEN));
while(Cnt != CONSUMER_VAL)
{
if(LeaveSqQueue(Task->Queue, TestData) != SUCCESS_FLAG)
{
continue;
}
LogFormat(Info,"Consumer : OK, TestData : %s.\n",TestData);
Cnt++;
}
free(TestData);
TestData = NULL;
THRD_EXIT(SUCCESS_FLAG);
}
Status main()
{
int i;
void *ThrdExitState = NULL;
OneTaskSt Task;
OneThrdSt **ConsumerArray = (OneThrdSt **)MyMalloc(sizeof(OneThrdSt *) * TEST_CONSUMER_THREAD_NUM);
OneThrdSt **ProducerArray = (OneThrdSt **)MyMalloc(sizeof(OneThrdSt *) * TEST_PRODUCER_THREAD_NUM);
InitAllSqQueue(&(Task.Queue),
QUEUE_LEN,
STRING_TYPE_FLAG,
PTHREAD_PROCESS_PRIVATE,
PTHREAD_MUTEX_ERRORCHECK,
PTHREAD_MUTEX_STALLED,
2,
10000,
CLOCK_REALTIME);
OneThrdMutexCreate(&(Task.Mutex),
PTHREAD_PROCESS_PRIVATE,
PTHREAD_MUTEX_ERRORCHECK,
PTHREAD_MUTEX_STALLED,
2,
1);
Task.AccessIndex = 0;
for ( i = 0; i < GLOBAL_ARRAY_ROW_NUM; i++)
{
GlobalArray[i][0] = i * TEST_INTERVAL_VAL;
GlobalArray[i][1] = GlobalArray[i][0] + TEST_INTERVAL_VAL;
}
for ( i = 0; i < TEST_PRODUCER_THREAD_NUM; i++)
{
OneThrdCreate(&(ProducerArray[i]),
PTHREAD_CREATE_JOINABLE,
PTHREAD_STACK_MIN,
ONE_PAGE_MEM_SIZE,
Producer,
&Task);
}
for ( i = 0; i < TEST_CONSUMER_THREAD_NUM; i++)
{
OneThrdCreate(&(ConsumerArray[i]),
PTHREAD_CREATE_JOINABLE,
PTHREAD_STACK_MIN,
ONE_PAGE_MEM_SIZE,
Consumer,
&Task);
}
for ( i = 0; i < TEST_PRODUCER_THREAD_NUM; i++)
{
ThrdWait(ProducerArray[i]->ThreadId, &ThrdExitState);
LogFormat(Debug,"ThrdExitState : %ld.\n",(long)ThrdExitState);
OneThrdFree(&(ProducerArray[i]));
}
for ( i = 0; i < TEST_CONSUMER_THREAD_NUM; i++)
{
ThrdWait(ConsumerArray[i]->ThreadId, &ThrdExitState);
LogFormat(Debug,"ThrdExitState : %ld.\n",(long)ThrdExitState);
OneThrdFree(&(ConsumerArray[i]));
}
free(ConsumerArray);
ConsumerArray = NULL;
free(ProducerArray);
ProducerArray = NULL;
PrintfSqQueue(Task.Queue, Debug);
DestroySqQueue(&(Task.Queue));
OneThrdMutexFree(&(Task.Mutex));
return SUCCESS_FLAG;
}
(2)编译
bash
[gbase@czg2 SqQueue]$ make clean
rm -rf TestSqQueue
rm -rf TestThreadQ
[gbase@czg2 SqQueue]$ make
gcc -Wall -Wextra -O3 -std=gnu11 TestThreadQ.c -o TestThreadQ -I /opt/Developer/ComputerLanguageStudy/C/DataStructureTestSrc/PublicFunction/ -I /opt/Developer/ComputerLanguageStudy/C/DataStructureTestSrc/Log/ -I /opt/Developer/ComputerLanguageStudy/C/DataStructureTestSrc/PublicFunction/Pthread/ -L /opt/Developer/ComputerLanguageStudy/C/DataStructureTestSrc/PublicFunction/Make/Libs/ -L /usr/lib64/ -l PublicFunction -l Log -l MyThread -l SqQueue
gcc -Wall -Wextra -O3 -std=gnu11 main.c -o TestSqQueue -I /opt/Developer/ComputerLanguageStudy/C/DataStructureTestSrc/PublicFunction/ -I /opt/Developer/ComputerLanguageStudy/C/DataStructureTestSrc/Log/ -I /opt/Developer/ComputerLanguageStudy/C/DataStructureTestSrc/PublicFunction/Pthread/ -L /opt/Developer/ComputerLanguageStudy/C/DataStructureTestSrc/PublicFunction/Make/Libs/ -L /usr/lib64/ -l PublicFunction -l Log -l MyThread -l SqQueue
(3)验证
消费者和生产者分别拿到了0-199,没有重复消费、多消费、少消费的情况发生,说明我们实现的正确。
bash
[gbase@czg2 SqQueue]$ ./TestThreadQ |sort -t ":" -k 5 -n
2024-04-08 14:47:46-P[53664]-T[53668]-[Info ]-Producer : OK, TestData : 0 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53677]-[Info ]-Consumer : OK, TestData : 0 I am a happy little angel. .
Producer : OK, TestData : 70 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53668]-[Info ]-Producer : OK, TestData : 1 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53684]-[Info ]-Consumer : OK, TestData : 1 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53668]-[Info ]-Producer : OK, TestData : 2 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53676]-[Info ]-Consumer : OK, TestData : 2 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53668]-[Info ]-Producer : OK, TestData : 3 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53676]-[Info ]-Consumer : OK, TestData : 3 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53668]-[Info ]-Producer : OK, TestData : 4 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53683]-[Info ]-Consumer : OK, TestData : 4 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53668]-[Info ]-Producer : OK, TestData : 5 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53683]-[Info ]-Consumer : OK, TestData : 5 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53668]-[Info ]-Producer : OK, TestData : 6 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53681]-[Info ]-Consumer : OK, TestData : 6 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53668]-[Info ]-Producer : OK, TestData : 7 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53680]-[Info ]-Consumer : OK, TestData : 7 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53668]-[Info ]-Producer : OK, TestData : 8 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53681]-[Info ]-Consumer : OK, TestData : 8 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53668]-[Info ]-Producer : OK, TestData : 9 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53681]-[Info ]-Consumer : OK, TestData : 9 I am a happy little angel. .
2024-04-08 06:47:46-P[53664]-T[53680]-[Info ]-Consumer : OK, TestData : 10 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53668]-[Info ]-Producer : OK, TestData : 10 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53668]-[Info ]-Producer : OK, TestData : 11 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53681]-[Info ]-Consumer : OK, TestData : 11 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53668]-[Info ]-Producer : OK, TestData : 12 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53678]-[Info ]-Consumer : OK, TestData : 12 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53668]-[Info ]-Producer : OK, TestData : 13 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53677]-[Info ]-Consumer : OK, TestData : 13 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53668]-[Info ]-Producer : OK, TestData : 14 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53678]-[Info ]-Consumer : OK, TestData : 14 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53668]-[Info ]-Producer : OK, TestData : 15 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53680]-[Info ]-Consumer : OK, TestData : 15 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53668]-[Info ]-Producer : OK, TestData : 16 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53680]-[Info ]-Consumer : OK, TestData : 16 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53668]-[Info ]-Producer : OK, TestData : 17 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53677]-[Info ]-Consumer : OK, TestData : 17 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53668]-[Info ]-Producer : OK, TestData : 18 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53677]-[Info ]-Consumer : OK, TestData : 18 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53668]-[Info ]-Producer : OK, TestData : 19 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53670]-[Info ]-Producer : OK, TestData : 20 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53683]-[Info ]-Consumer : OK, TestData : 20 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53670]-[Info ]-Producer : OK, TestData : 21 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53676]-[Info ]-Consumer : OK, TestData : 21 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53670]-[Info ]-Producer : OK, TestData : 22 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53676]-[Info ]-Consumer : OK, TestData : 22 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53670]-[Info ]-Producer : OK, TestData : 23 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53676]-[Info ]-Consumer : OK, TestData : 23 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53670]-[Info ]-Producer : OK, TestData : 24 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53676]-[Info ]-Consumer : OK, TestData : 24 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53670]-[Info ]-Producer : OK, TestData : 25 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53676]-[Info ]-Consumer : OK, TestData : 25 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53670]-[Info ]-Producer : OK, TestData : 26 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53676]-[Info ]-Consumer : OK, TestData : 26 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53670]-[Info ]-Producer : OK, TestData : 27 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53676]-[Info ]-Consumer : OK, TestData : 27 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53670]-[Info ]-Producer : OK, TestData : 28 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53676]-[Info ]-Consumer : OK, TestData : 28 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53670]-[Info ]-Producer : OK, TestData : 29 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53676]-[Info ]-Consumer : OK, TestData : 29 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53670]-[Info ]-Producer : OK, TestData : 30 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53682]-[Info ]-Consumer : OK, TestData : 30 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53670]-[Info ]-Producer : OK, TestData : 31 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53677]-[Info ]-Consumer : OK, TestData : 31 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53670]-[Info ]-Producer : OK, TestData : 32 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53680]-[Info ]-Consumer : OK, TestData : 32 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53670]-[Info ]-Producer : OK, TestData : 33 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53677]-[Info ]-Consumer : OK, TestData : 33 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53670]-[Info ]-Producer : OK, TestData : 34 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53676]-[Info ]-Consumer : OK, TestData : 34 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53670]-[Info ]-Producer : OK, TestData : 35 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53676]-[Info ]-Consumer : OK, TestData : 35 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53670]-[Info ]-Producer : OK, TestData : 36 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53680]-[Info ]-Consumer : OK, TestData : 36 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53670]-[Info ]-Producer : OK, TestData : 37 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53680]-[Info ]-Consumer : OK, TestData : 37 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53670]-[Info ]-Producer : OK, TestData : 38 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53680]-[Info ]-Consumer : OK, TestData : 38 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53670]-[Info ]-Producer : OK, TestData : 39 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53681]-[Info ]-Consumer : OK, TestData : 39 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53674]-[Info ]-Producer : OK, TestData : 40 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53676]-[Info ]-Consumer : OK, TestData : 40 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53674]-[Info ]-Producer : OK, TestData : 41 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53676]-[Info ]-Consumer : OK, TestData : 41 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53674]-[Info ]-Producer : OK, TestData : 42 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53679]-[Info ]-Consumer : OK, TestData : 42 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53674]-[Info ]-Producer : OK, TestData : 43 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53679]-[Info ]-Consumer : OK, TestData : 43 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53674]-[Info ]-Producer : OK, TestData : 44 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53679]-[Info ]-Consumer : OK, TestData : 44 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53674]-[Info ]-Producer : OK, TestData : 45 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53679]-[Info ]-Consumer : OK, TestData : 45 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53674]-[Info ]-Producer : OK, TestData : 46 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53679]-[Info ]-2024-04-08 14:47:46-P[53664]-T[53672]-[Info ]-Consumer : OK, TestData : 19 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53679]-[Info ]-Consumer : OK, TestData : 46 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53674]-[Info ]-Producer : OK, TestData : 47 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53678]-[Info ]-Consumer : OK, TestData : 47 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53674]-[Info ]-Producer : OK, TestData : 48 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53679]-[Info ]-Consumer : OK, TestData : 48 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53674]-[Info ]-Producer : OK, TestData : 49 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53679]-[Info ]-Consumer : OK, TestData : 49 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53674]-[Info ]-Producer : OK, TestData : 50 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53681]-[Info ]-Consumer : OK, TestData : 50 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53674]-[Info ]-Producer : OK, TestData : 51 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53677]-[Info ]-Consumer : OK, TestData : 51 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53674]-[Info ]-Producer : OK, TestData : 52 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53684]-[Info ]-Consumer : OK, TestData : 52 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53674]-[Info ]-Producer : OK, TestData : 53 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53684]-[Info ]-Consumer : OK, TestData : 53 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53674]-[Info ]-Producer : OK, TestData : 54 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53684]-[Info ]-Consumer : OK, TestData : 54 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53674]-[Info ]-Producer : OK, TestData : 55 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53685]-[Info ]-Consumer : OK, TestData : 55 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53674]-[Info ]-Producer : OK, TestData : 56 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53685]-[Info ]-Consumer : OK, TestData : 56 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53674]-[Info ]-Producer : OK, TestData : 57 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53685]-[Info ]-Consumer : OK, TestData : 57 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53674]-[Info ]-Producer : OK, TestData : 58 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53685]-[Info ]-Consumer : OK, TestData : 58 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53674]-[Info ]-Producer : OK, TestData : 59 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53685]-[Info ]-Consumer : OK, TestData : 59 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53672]-[Info ]-Producer : OK, TestData : 60 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53678]-[Info ]-Consumer : OK, TestData : 60 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53672]-[Info ]-Producer : OK, TestData : 61 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53681]-[Info ]-Consumer : OK, TestData : 61 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53672]-[Info ]-Producer : OK, TestData : 62 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53679]-[Info ]-Consumer : OK, TestData : 62 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53672]-[Info ]-Producer : OK, TestData : 63 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53679]-[Info ]-Consumer : OK, TestData : 63 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53672]-[Info ]-Producer : OK, TestData : 64 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53679]-[Info ]-Consumer : OK, TestData : 64 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53672]-[Info ]-Producer : OK, TestData : 65 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53684]-[Info ]-Consumer : OK, TestData : 65 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53672]-[Info ]-Producer : OK, TestData : 66 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53684]-[Info ]-Consumer : OK, TestData : 66 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53672]-[Info ]-Producer : OK, TestData : 67 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53679]-[Info ]-Consumer : OK, TestData : 67 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53672]-[Info ]-Producer : OK, TestData : 68 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53679]-[Info ]-Consumer : OK, TestData : 68 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53672]-[Info ]-Producer : OK, TestData : 69 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53681]-[Info ]-Consumer : OK, TestData : 69 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53677]-[Info ]-Consumer : OK, TestData : 70 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53672]-[Info ]-Producer : OK, TestData : 71 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53677]-[Info ]-Consumer : OK, TestData : 71 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53672]-[Info ]-Producer : OK, TestData : 72 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53684]-[Info ]-Consumer : OK, TestData : 72 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53672]-[Info ]-Producer : OK, TestData : 73 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53684]-[Info ]-Consumer : OK, TestData : 73 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53672]-[Info ]-Producer : OK, TestData : 74 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53682]-[Info ]-Consumer : OK, TestData : 74 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53672]-[Info ]-Producer : OK, TestData : 75 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53682]-[Info ]-Consumer : OK, TestData : 75 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53672]-[Info ]-Producer : OK, TestData : 76 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53682]-[Info ]-Consumer : OK, TestData : 76 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53672]-[Info ]-Producer : OK, TestData : 77 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53684]-[Info ]-Consumer : OK, TestData : 77 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53672]-[Info ]-Producer : OK, TestData : 78 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53684]-[Info ]-Consumer : OK, TestData : 78 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53672]-[Info ]-Producer : OK, TestData : 79 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53684]-[Info ]-Consumer : OK, TestData : 79 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53671]-[Info ]-Producer : OK, TestData : 80 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53679]-[Info ]-Consumer : OK, TestData : 80 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53671]-[Info ]-Producer : OK, TestData : 81 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53683]-[Info ]-Consumer : OK, TestData : 81 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53671]-[Info ]-Producer : OK, TestData : 82 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53683]-[Info ]-Consumer : OK, TestData : 82 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53671]-[Info ]-Producer : OK, TestData : 83 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53685]-[Info ]-Consumer : OK, TestData : 83 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53671]-[Info ]-Producer : OK, TestData : 84 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53678]-[Info ]-Consumer : OK, TestData : 84 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53671]-[Info ]-Producer : OK, TestData : 85 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53678]-[Info ]-Consumer : OK, TestData : 85 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53671]-[Info ]-Producer : OK, TestData : 86 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53678]-[Info ]-Consumer : OK, TestData : 86 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53671]-[Info ]-Producer : OK, TestData : 87 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53678]-[Info ]-Consumer : OK, TestData : 87 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53671]-[Info ]-Producer : OK, TestData : 88 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53678]-[Info ]-Consumer : OK, TestData : 88 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53671]-[Info ]-Producer : OK, TestData : 89 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53678]-[Info ]-Consumer : OK, TestData : 89 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53671]-[Info ]-Producer : OK, TestData : 90 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53678]-[Info ]-Consumer : OK, TestData : 90 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53671]-[Info ]-Producer : OK, TestData : 91 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53677]-[Info ]-Consumer : OK, TestData : 91 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53671]-[Info ]-Producer : OK, TestData : 92 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53677]-[Info ]-Consumer : OK, TestData : 92 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53671]-[Info ]-Producer : OK, TestData : 93 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53683]-[Info ]-Consumer : OK, TestData : 93 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53671]-[Info ]-Producer : OK, TestData : 94 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53676]-[Info ]-Consumer : OK, TestData : 94 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53671]-[Info ]-Producer : OK, TestData : 95 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53682]-[Info ]-Consumer : OK, TestData : 95 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53671]-[Info ]-Producer : OK, TestData : 96 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53682]-[Info ]-Consumer : OK, TestData : 96 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53671]-[Info ]-Producer : OK, TestData : 97 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53685]-[Info ]-Consumer : OK, TestData : 97 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53671]-[Info ]-Producer : OK, TestData : 98 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53682]-[Info ]-Consumer : OK, TestData : 98 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53671]-[Info ]-Producer : OK, TestData : 99 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53685]-[Info ]-Consumer : OK, TestData : 99 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53666]-[Info ]-Producer : OK, TestData : 100 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53684]-[Info ]-Consumer : OK, TestData : 100 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53666]-[Info ]-Producer : OK, TestData : 101 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53683]-[Info ]-Consumer : OK, TestData : 101 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53666]-[Info ]-Producer : OK, TestData : 102 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53685]-[Info ]-Consumer : OK, TestData : 102 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53666]-[Info ]-Producer : OK, TestData : 103 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53682]-[Info ]-Consumer : OK, TestData : 103 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53666]-[Info ]-Producer : OK, TestData : 104 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53681]-[Info ]-Consumer : OK, TestData : 104 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53666]-[Info ]-Producer : OK, TestData : 105 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53683]-[Info ]-Consumer : OK, TestData : 105 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53666]-[Info ]-Producer : OK, TestData : 106 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53683]-[Info ]-Consumer : OK, TestData : 106 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53666]-[Info ]-Producer : OK, TestData : 107 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53679]-[Info ]-Consumer : OK, TestData : 107 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53666]-[Info ]-Producer : OK, TestData : 108 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53680]-[Info ]-Consumer : OK, TestData : 108 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53666]-[Info ]-Producer : OK, TestData : 109 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53683]-[Info ]-Consumer : OK, TestData : 109 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53666]-[Info ]-Producer : OK, TestData : 110 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53677]-[Info ]-Consumer : OK, TestData : 110 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53666]-[Info ]-Producer : OK, TestData : 111 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53677]-[Info ]-Consumer : OK, TestData : 111 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53666]-[Info ]-Producer : OK, TestData : 112 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53677]-[Info ]-Consumer : OK, TestData : 112 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53666]-[Info ]-Producer : OK, TestData : 113 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53681]-[Info ]-Consumer : OK, TestData : 113 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53666]-[Info ]-Producer : OK, TestData : 114 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53680]-[Info ]-Consumer : OK, TestData : 114 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53666]-[Info ]-Producer : OK, TestData : 115 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53676]-[Info ]-Consumer : OK, TestData : 115 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53666]-[Info ]-Producer : OK, TestData : 116 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53681]-[Info ]-Consumer : OK, TestData : 116 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53666]-[Info ]-Producer : OK, TestData : 117 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53681]-[Info ]-Consumer : OK, TestData : 117 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53666]-[Info ]-Producer : OK, TestData : 118 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53685]-[Info ]-Consumer : OK, TestData : 118 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53666]-[Info ]-Producer : OK, TestData : 119 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53684]-[Info ]-Consumer : OK, TestData : 119 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53673]-[Info ]-Producer : OK, TestData : 120 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53681]-[Info ]-Consumer : OK, TestData : 120 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53673]-[Info ]-Producer : OK, TestData : 121 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53677]-[Info ]-Consumer : OK, TestData : 121 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53673]-[Info ]-Producer : OK, TestData : 122 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53678]-[Info ]-Consumer : OK, TestData : 122 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53673]-[Info ]-Producer : OK, TestData : 123 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53682]-[Info ]-Consumer : OK, TestData : 123 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53673]-[Info ]-Producer : OK, TestData : 124 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53680]-[Info ]-Consumer : OK, TestData : 124 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53673]-[Info ]-Producer : OK, TestData : 125 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53680]-[Info ]-Consumer : OK, TestData : 125 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53673]-[Info ]-Producer : OK, TestData : 126 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53676]-[Info ]-Consumer : OK, TestData : 126 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53673]-[Info ]-Producer : OK, TestData : 127 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53685]-[Info ]-Consumer : OK, TestData : 127 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53673]-[Info ]-Producer : OK, TestData : 128 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53682]-[Info ]-Consumer : OK, TestData : 128 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53673]-[Info ]-Producer : OK, TestData : 129 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53685]-[Info ]-Consumer : OK, TestData : 129 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53673]-[Info ]-Producer : OK, TestData : 130 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53685]-[Info ]-Consumer : OK, TestData : 130 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53673]-[Info ]-Producer : OK, TestData : 131 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53685]-[Info ]-Consumer : OK, TestData : 131 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53673]-[Info ]-Producer : OK, TestData : 132 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53685]-[Info ]-Consumer : OK, TestData : 132 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53673]-[Info ]-Producer : OK, TestData : 133 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53685]-[Info ]-Consumer : OK, TestData : 133 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53673]-[Info ]-Producer : OK, TestData : 134 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53682]-[Info ]-Consumer : OK, TestData : 134 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53673]-[Info ]-Producer : OK, TestData : 135 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53684]-[Info ]-Consumer : OK, TestData : 135 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53673]-[Info ]-Producer : OK, TestData : 136 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53682]-[Info ]-Consumer : OK, TestData : 136 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53673]-[Info ]-Producer : OK, TestData : 137 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53684]-[Info ]-Consumer : OK, TestData : 137 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53673]-[Info ]-Producer : OK, TestData : 138 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53685]-[Info ]-Consumer : OK, TestData : 138 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53673]-[Info ]-Producer : OK, TestData : 139 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53685]-[Info ]-Consumer : OK, TestData : 139 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53675]-[Info ]-Producer : OK, TestData : 140 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53680]-[Info ]-Consumer : OK, TestData : 140 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53675]-[Info ]-Producer : OK, TestData : 141 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53684]-[Info ]-Consumer : OK, TestData : 141 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53675]-[Info ]-Producer : OK, TestData : 142 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53679]-[Info ]-Consumer : OK, TestData : 142 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53675]-[Info ]-Producer : OK, TestData : 143 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53679]-[Info ]-Consumer : OK, TestData : 143 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53675]-[Info ]-Producer : OK, TestData : 144 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53676]-[Info ]-Consumer : OK, TestData : 144 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53675]-[Info ]-Producer : OK, TestData : 145 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53681]-[Info ]-Consumer : OK, TestData : 145 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53675]-[Info ]-Producer : OK, TestData : 146 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53680]-[Info ]-Consumer : OK, TestData : 146 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53675]-[Info ]-Producer : OK, TestData : 147 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53676]-[Info ]-Consumer : OK, TestData : 147 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53675]-[Info ]-Producer : OK, TestData : 148 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53682]-[Info ]-Consumer : OK, TestData : 148 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53675]-[Info ]-Producer : OK, TestData : 149 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53681]-[Info ]-Consumer : OK, TestData : 149 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53675]-[Info ]-Producer : OK, TestData : 150 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53681]-[Info ]-Consumer : OK, TestData : 150 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53675]-[Info ]-Producer : OK, TestData : 151 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53681]-[Info ]-Consumer : OK, TestData : 151 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53675]-[Info ]-Producer : OK, TestData : 152 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53680]-[Info ]-Consumer : OK, TestData : 152 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53675]-[Info ]-Producer : OK, TestData : 153 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53677]-[Info ]-Consumer : OK, TestData : 153 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53675]-[Info ]-Producer : OK, TestData : 154 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53677]-[Info ]-Consumer : OK, TestData : 154 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53675]-[Info ]-Producer : OK, TestData : 155 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53677]-[Info ]-Consumer : OK, TestData : 155 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53675]-[Info ]-Producer : OK, TestData : 156 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53680]-[Info ]-Consumer : OK, TestData : 156 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53675]-[Info ]-Producer : OK, TestData : 157 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53680]-[Info ]-Consumer : OK, TestData : 157 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53675]-[Info ]-Producer : OK, TestData : 158 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53684]-[Info ]-Consumer : OK, TestData : 158 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53675]-[Info ]-Producer : OK, TestData : 159 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53682]-[Info ]-Consumer : OK, TestData : 159 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53667]-[Info ]-Producer : OK, TestData : 160 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53682]-[Info ]-Consumer : OK, TestData : 160 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53667]-[Info ]-Producer : OK, TestData : 161 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53678]-[Info ]-Consumer : OK, TestData : 161 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53667]-[Info ]-Producer : OK, TestData : 162 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53683]-[Info ]-Consumer : OK, TestData : 162 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53667]-[Info ]-Producer : OK, TestData : 163 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53683]-[Info ]-Consumer : OK, TestData : 163 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53667]-[Info ]-Producer : OK, TestData : 164 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53677]-[Info ]-Consumer : OK, TestData : 164 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53667]-[Info ]-Producer : OK, TestData : 165 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53681]-[Info ]-Consumer : OK, TestData : 165 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53667]-[Info ]-Producer : OK, TestData : 166 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53678]-[Info ]-Consumer : OK, TestData : 166 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53667]-[Info ]-Producer : OK, TestData : 167 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53678]-[Info ]-Consumer : OK, TestData : 167 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53667]-[Info ]-Producer : OK, TestData : 168 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53678]-[Info ]-Consumer : OK, TestData : 168 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53667]-[Info ]-Producer : OK, TestData : 169 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53683]-[Info ]-Consumer : OK, TestData : 169 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53667]-[Info ]-Producer : OK, TestData : 170 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53683]-[Info ]-Consumer : OK, TestData : 170 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53667]-[Info ]-Producer : OK, TestData : 171 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53683]-[Info ]-Consumer : OK, TestData : 171 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53667]-[Info ]-Producer : OK, TestData : 172 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53683]-[Info ]-Consumer : OK, TestData : 172 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53667]-[Info ]-Producer : OK, TestData : 173 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53683]-[Info ]-Consumer : OK, TestData : 173 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53667]-[Info ]-Producer : OK, TestData : 174 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53683]-[Info ]-Consumer : OK, TestData : 174 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53667]-[Info ]-Producer : OK, TestData : 175 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53680]-[Info ]-Consumer : OK, TestData : 175 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53667]-[Info ]-Producer : OK, TestData : 176 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53684]-[Info ]-Consumer : OK, TestData : 176 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53667]-[Info ]-Producer : OK, TestData : 177 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53684]-[Info ]-Consumer : OK, TestData : 177 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53667]-[Info ]-Producer : OK, TestData : 178 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53684]-[Info ]-Consumer : OK, TestData : 178 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53667]-[Info ]-Producer : OK, TestData : 179 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53685]-[Info ]-Consumer : OK, TestData : 179 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53669]-[Info ]-Producer : OK, TestData : 180 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53685]-[Info ]-Consumer : OK, TestData : 180 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53669]-[Info ]-Producer : OK, TestData : 181 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53677]-[Info ]-Consumer : OK, TestData : 181 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53669]-[Info ]-Producer : OK, TestData : 182 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53682]-[Info ]-Consumer : OK, TestData : 182 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53669]-[Info ]-Producer : OK, TestData : 183 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53678]-[Info ]-Consumer : OK, TestData : 183 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53669]-[Info ]-Producer : OK, TestData : 184 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53678]-[Info ]-Consumer : OK, TestData : 184 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53669]-[Info ]-Producer : OK, TestData : 185 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53678]-[Info ]-Consumer : OK, TestData : 185 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53669]-[Info ]-Producer : OK, TestData : 186 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53678]-[Info ]-Consumer : OK, TestData : 186 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53669]-[Info ]-Producer : OK, TestData : 187 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53680]-[Info ]-Consumer : OK, TestData : 187 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53669]-[Info ]-Producer : OK, TestData : 188 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53679]-[Info ]-Consumer : OK, TestData : 188 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53669]-[Info ]-Producer : OK, TestData : 189 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53679]-[Info ]-Consumer : OK, TestData : 189 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53669]-[Info ]-Producer : OK, TestData : 190 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53679]-[Info ]-Consumer : OK, TestData : 190 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53669]-[Info ]-Producer : OK, TestData : 191 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53681]-[Info ]-Consumer : OK, TestData : 191 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53669]-[Info ]-Producer : OK, TestData : 192 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53681]-[Info ]-Consumer : OK, TestData : 192 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53669]-[Info ]-Producer : OK, TestData : 193 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53680]-[Info ]-Consumer : OK, TestData : 193 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53669]-[Info ]-Producer : OK, TestData : 194 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53683]-[Info ]-Consumer : OK, TestData : 194 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53669]-[Info ]-Producer : OK, TestData : 195 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53682]-[Info ]-Consumer : OK, TestData : 195 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53669]-[Info ]-Producer : OK, TestData : 196 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53682]-[Info ]-Consumer : OK, TestData : 196 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53669]-[Info ]-Producer : OK, TestData : 197 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53683]-[Info ]-Consumer : OK, TestData : 197 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53669]-[Info ]-Producer : OK, TestData : 198 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53682]-[Info ]-Consumer : OK, TestData : 198 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53669]-[Info ]-Producer : OK, TestData : 199 I am a happy little angel. .
2024-04-08 14:47:46-P[53664]-T[53682]-[Info ]-Consumer : OK, TestData : 199 I am a happy little angel. .
五、线程池测试验证
就上面队列的基础上加上线程的管理,最主要的区别是上面的队列实现为拷贝数据,也就是说生产者需要把数据拷贝到队列,消费者需要把数据从队列中拷贝到自己的线程中。有两次数据的拷贝,而线程池中是拷贝指针而不是拷贝数据,在一些场景中线程池的效率会高于队列。上面这个测试结果我取的是最好的结果。
那有人就会问了现在这个场景为什么看不出效果呢,我总结原因有以下几点:
1、int类型占用4个字节,指针类型占用8个字节,任务的消费和生产在线程池中就消耗较大。
2、线程池的实现在队列的基础上加了屏障和读写锁,这些也会消耗一部分性能。
后面我们会验证一下字符类型,来证明我们的猜想。
1、int类型
(1)示意图
(2)Demo
cpp
#include "ThreadPool.h"
#define TEST_CONSUMER_THREAD_NUM 10
#define TEST_PRODUCER_THREAD_NUM 10
#define TEST_INTERVAL_VAL 20
#define PRODUCER_SUM_VAL (TEST_PRODUCER_THREAD_NUM * TEST_INTERVAL_VAL)
#define CONSUMER_VAL (PRODUCER_SUM_VAL / TEST_CONSUMER_THREAD_NUM)
#define QUEUE_LEN 8
#define GLOBAL_ARRAY_COL_NUM 2
#define GLOBAL_ARRAY_ROW_NUM TEST_PRODUCER_THREAD_NUM
int GlobalArray[GLOBAL_ARRAY_ROW_NUM][GLOBAL_ARRAY_COL_NUM];
typedef struct ToatalSt
{
ThrdPool *Pool;
int AccessIndex;
OneThrdMutexSt *Mutex;
}ToatalSt;
Status PrintNums(void* Arg)
{
LogFormat(Info,"PrintNums : %d.\n",*((int *)Arg));
return SUCCESS_FLAG;
}
void* Producer(void* Arg)
{
int i;
int j = 0;
int Idx;
ToatalSt *Total = (ToatalSt *)Arg;
TaskGrpSt **TaskGrpArry = (TaskGrpSt **)MyMalloc(sizeof(TaskGrpSt *) * INIT_TASK_GRP_NUMS);
TaskSt *TaskArray = (TaskSt*)MyMalloc(sizeof(TaskSt) * INIT_TASK_GRP_NUMS);
THRD_MUTEX_LOCK_F(Total->Mutex);
Idx = Total->AccessIndex;
Total->AccessIndex++;
THRD_MUTEX_UNLOCK_F(Total->Mutex);
for (i = 0; i < INIT_TASK_GRP_NUMS; i++)
{
//初始化失败的话,会内存泄露,后面改进。
if(TaskGrpInit(&(TaskGrpArry[i]), 1, TASK_RETRY_TIMES) != SUCCESS_FLAG)
{
goto ERR_STAGE;
}
TaskArray[i].Func = PrintNums;
TaskArray[i].Arg = (int*)MyMalloc(sizeof(int));
TaskArray[i].State = TASK_INIT_STATE;
TaskGrpAddTask(TaskGrpArry[i], &(TaskArray[i]));
}
for ( i = GlobalArray[Idx][0]; i < GlobalArray[Idx][1]; i++)
{
SCAN_REC_STAGE:
for (; j < INIT_TASK_GRP_NUMS; j++)//避免每次从头扫描数组,提升效率。
{
THRD_RW_LOCK_READ_LOCK_F(TaskGrpArry[j]->StateRwLock);
if (TaskGrpArry[j]->State == TASK_GRP_END_STATE ||
TaskGrpArry[j]->State == TASK_GRP_INIT_STATE)//有任务结束或任务空间未使用。
{
THRD_RW_LOCK_UNLOCK_F(TaskGrpArry[j]->StateRwLock);
break;
}
THRD_RW_LOCK_UNLOCK_F(TaskGrpArry[j]->StateRwLock);
}
if (j >= INIT_TASK_GRP_NUMS)//说明没有可用空间
{
j = 0;
goto SCAN_REC_STAGE;//继续扫描数据查看是否有空间腾出。
}
//从数据库中抽取x万条数据。
*((int*)(TaskArray[j].Arg)) = i;
//将任务组压入线程池中。
ThrdPoolAddTaskGrp(Total->Pool, TaskGrpArry[j]);
LogFormat(Info,"Producer : %d.\n",*((int*)(TaskArray[j].Arg)));
j++;//防止重复扫描数据。
if (j >= INIT_TASK_GRP_NUMS)
{
j = 0;
}
}
//由于数据是存储在生产者线程中的,所以可能出现任务下发完了,但消费者还没有完成任务。
//需要等所有任务完成。
THRD_BARRIER_WAIT_F(Total->Pool->ProducerBarrier);
THRD_BARRIER_WAIT_F(Total->Pool->AllBarrier);
//释放资源
for (i = 0; i < INIT_TASK_GRP_NUMS; i++)
{
if(TaskGrpDstry(&(TaskGrpArry[i])) != SUCCESS_FLAG)
{
goto ERR_STAGE;
}
free(TaskArray[i].Arg);
TaskArray[i].Arg = NULL;
TaskArray[i].Func = NULL;
TaskArray[i].State = TASK_INIT_STATE;
}
free(TaskGrpArry);
free(TaskArray);
TaskGrpArry = NULL;
TaskArray = NULL;
THRD_EXIT(SUCCESS_FLAG);
ERR_STAGE:
THRD_EXIT(FAIL_FLAG);
}
Status main()
{
int i;
ToatalSt Total;
OneThrdMutexCreate(&(Total.Mutex),
PTHREAD_PROCESS_PRIVATE,
PTHREAD_MUTEX_ERRORCHECK,
PTHREAD_MUTEX_STALLED,
2,
1);
Total.AccessIndex = 0;
for ( i = 0; i < GLOBAL_ARRAY_ROW_NUM; i++)
{
GlobalArray[i][0] = i * TEST_INTERVAL_VAL;
GlobalArray[i][1] = GlobalArray[i][0] + TEST_INTERVAL_VAL;
}
ThrdPoolInit(&(Total.Pool),
TEST_CONSUMER_THREAD_NUM,
TEST_PRODUCER_THREAD_NUM,
QUEUE_LEN,
Producer,
&Total);
ThrdPoolDstry(&(Total.Pool));
OneThrdMutexFree(&(Total.Mutex));
return SUCCESS_FLAG;
}
(3)编译
bash
[gbase@czg2 MyPool]$ make clean
rm -rf TestThreadPool
[gbase@czg2 MyPool]$ make
gcc -Wall -Wextra -O3 -std=gnu11 TestThreadPool.c -o TestThreadPool -I /opt/Developer/ComputerLanguageStudy/C/DataStructureTestSrc/PublicFunction/ -I /opt/Developer/ComputerLanguageStudy/C/DataStructureTestSrc/Log/ -I /opt/Developer/ComputerLanguageStudy/C/DataStructureTestSrc/PublicFunction/Pthread/ -I /opt/Developer/ComputerLanguageStudy/C/DataStructureTestSrc/PublicFunction/SqQueue/ -L /opt/Developer/ComputerLanguageStudy/C/DataStructureTestSrc/PublicFunction/Make/Libs/ -L /usr/lib64/ -l PublicFunction -l Log -l MyThread -l SqQueue -l MyPool
(4)验证
消费者和生产者分别拿到了0-199,没有重复消费、多消费、少消费的情况发生,说明我们实现的正确。
bash
[gbase@czg2 MyPool]$ ./TestThreadPool |sort -t ":" -k 4 -n
2024-04-08 10:38:13-P[48233]-T[48237]-[Info ]-Producer : 0.
2024-04-08 10:38:13-P[48233]-T[48245]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 10:38:13-P[48233]-T[48247]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 10:38:13-P[48233]-T[48248]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 10:38:13-P[48233]-T[48249]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 10:38:13-P[48233]-T[48250]-[Info ]-PrintNums : 0.
2024-04-08 10:38:13-P[48233]-T[48250]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 10:38:13-P[48233]-T[48251]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 10:38:13-P[48233]-T[48252]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 10:38:13-P[48233]-T[48253]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 10:38:13-P[48233]-T[48254]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
PrintNums : 155.
PrintNums : 30.
2024-04-08 10:38:13-P[48233]-T[48237]-[Info ]-Producer : 1.
2024-04-08 10:38:13-P[48233]-T[48250]-[Info ]-PrintNums : 1.
2024-04-08 10:38:13-P[48233]-T[48237]-[Info ]-Producer : 2.
2024-04-08 10:38:13-P[48233]-T[48250]-[Info ]-PrintNums : 2.
2024-04-08 10:38:13-P[48233]-T[48237]-[Info ]-Producer : 3.
2024-04-08 10:38:13-P[48233]-T[48250]-[Info ]-PrintNums : 3.
2024-04-08 10:38:13-P[48233]-T[48237]-[Info ]-Producer : 4.
2024-04-08 10:38:13-P[48233]-T[48250]-[Info ]-PrintNums : 4.
2024-04-08 10:38:13-P[48233]-T[48237]-[Info ]-Producer : 5.
2024-04-08 10:38:13-P[48233]-T[48250]-[Info ]-PrintNums : 5.
2024-04-08 10:38:13-P[48233]-T[48237]-[Info ]-Producer : 6.
2024-04-08 10:38:13-P[48233]-T[48250]-[Info ]-PrintNums : 6.
2024-04-08 10:38:13-P[48233]-T[48237]-[Info ]-Producer : 7.
2024-04-08 10:38:13-P[48233]-T[48250]-[Info ]-PrintNums : 7.
2024-04-08 10:38:13-P[48233]-T[48237]-[Info ]-Producer : 8.
2024-04-08 10:38:13-P[48233]-T[48245]-[Info ]-PrintNums : 8.
2024-04-08 10:38:13-P[48233]-T[48237]-[Info ]-Producer : 9.
2024-04-08 10:38:13-P[48233]-T[48251]-[Info ]-PrintNums : 9.
2024-04-08 10:38:13-P[48233]-T[48237]-[Info ]-Producer : 10.
2024-04-08 10:38:13-P[48233]-T[48251]-[Info ]-PrintNums : 10.
2024-04-08 10:38:13-P[48233]-T[48237]-[Info ]-Producer : 11.
2024-04-08 10:38:13-P[48233]-T[48251]-[Info ]-PrintNums : 11.
2024-04-08 10:38:13-P[48233]-T[48237]-[Info ]-Producer : 12.
2024-04-08 10:38:13-P[48233]-T[48253]-[Info ]-PrintNums : 12.
2024-04-08 10:38:13-P[48233]-T[48237]-[Info ]-Producer : 13.
2024-04-08 10:38:13-P[48233]-T[48250]-[Info ]-PrintNums : 13.
2024-04-08 10:38:13-P[48233]-T[48237]-[Info ]-Producer : 14.
2024-04-08 10:38:13-P[48233]-T[48250]-[Info ]-PrintNums : 14.
2024-04-08 10:38:13-P[48233]-T[48237]-[Info ]-Producer : 15.
2024-04-08 10:38:13-P[48233]-T[48250]-[Info ]-PrintNums : 15.
2024-04-08 10:38:13-P[48233]-T[48237]-[Info ]-Producer : 16.
2024-04-08 10:38:13-P[48233]-T[48250]-[Info ]-PrintNums : 16.
2024-04-08 10:38:13-P[48233]-T[48237]-[Info ]-Producer : 17.
2024-04-08 10:38:13-P[48233]-T[48250]-[Info ]-PrintNums : 17.
2024-04-08 10:38:13-P[48233]-T[48237]-[Info ]-Producer : 18.
2024-04-08 10:38:13-P[48233]-T[48250]-[Info ]-PrintNums : 18.
2024-04-08 10:38:13-P[48233]-T[48237]-[Info ]-Producer : 19.
2024-04-08 10:38:13-P[48233]-T[48250]-[Info ]-PrintNums : 19.
2024-04-08 10:38:13-P[48233]-T[48239]-[Info ]-Producer : 20.
2024-04-08 10:38:13-P[48233]-T[48252]-[Info ]-PrintNums : 20.
2024-04-08 10:38:13-P[48233]-T[48239]-[Info ]-Producer : 21.
2024-04-08 10:38:13-P[48233]-T[48252]-[Info ]-PrintNums : 21.
2024-04-08 10:38:13-P[48233]-T[48239]-[Info ]-Producer : 22.
2024-04-08 10:38:13-P[48233]-T[48252]-[Info ]-PrintNums : 22.
2024-04-08 10:38:13-P[48233]-T[48239]-[Info ]-Producer : 23.
2024-04-08 10:38:13-P[48233]-T[48252]-[Info ]-PrintNums : 23.
2024-04-08 10:38:13-P[48233]-T[48239]-[Info ]-Producer : 24.
2024-04-08 10:38:13-P[48233]-T[48252]-[Info ]-PrintNums : 24.
2024-04-08 10:38:13-P[48233]-T[48239]-[Info ]-Producer : 25.
2024-04-08 10:38:13-P[48233]-T[48252]-[Info ]-PrintNums : 25.
2024-04-08 10:38:13-P[48233]-T[48239]-[Info ]-Producer : 26.
2024-04-08 10:38:13-P[48233]-T[48252]-[Info ]-PrintNums : 26.
2024-04-08 10:38:13-P[48233]-T[48239]-[Info ]-Producer : 27.
2024-04-08 10:38:13-P[48233]-T[48252]-[Info ]-PrintNums : 27.
2024-04-08 10:38:13-P[48233]-T[48239]-[Info ]-Producer : 28.
2024-04-08 10:38:13-P[48233]-T[48251]-[Info ]-PrintNums : 28.
2024-04-08 10:38:13-P[48233]-T[48239]-[Info ]-Producer : 29.
2024-04-08 10:38:13-P[48233]-T[48253]-[Info ]-PrintNums : 29.
2024-04-08 10:38:13-P[48233]-T[48239]-[Info ]-Producer : 30.
2024-04-08 10:38:13-P[48233]-T[48239]-[Info ]-Producer : 31.
2024-04-08 10:38:13-P[48233]-T[48247]-[Info ]-PrintNums : 31.
2024-04-08 10:38:13-P[48233]-T[48239]-[Info ]-Producer : 32.
2024-04-08 10:38:13-P[48233]-T[48245]-[Info ]-PrintNums : 32.
2024-04-08 10:38:13-P[48233]-T[48245]-[Info ]-PrintNums : 33.
2024-04-08 10:38:13-P[48233]-T[48239]-[Info ]-Producer : 34.
2024-04-08 10:38:13-P[48233]-T[48245]-[Info ]-PrintNums : 34.
2024-04-08 10:38:13-P[48233]-T[48239]-[Info ]-Producer : 35.
2024-04-08 10:38:13-P[48233]-T[48245]-[Info ]-PrintNums : 35.
2024-04-08 10:38:13-P[48233]-T[48239]-[Info ]-Producer : 36.
2024-04-08 10:38:13-P[48233]-T[48245]-[Info ]-PrintNums : 36.
2024-04-08 10:38:13-P[48233]-T[48239]-[Info ]-Producer : 37.
2024-04-08 10:38:13-P[48233]-T[48245]-[Info ]-PrintNums : 37.
2024-04-08 10:38:13-P[48233]-T[48239]-[Info ]-2024-04-08 10:38:13-P[48233]-T[48247]-[Info ]-Producer : 33.
2024-04-08 10:38:13-P[48233]-T[48239]-[Info ]-Producer : 38.
2024-04-08 10:38:13-P[48233]-T[48245]-[Info ]-PrintNums : 38.
2024-04-08 10:38:13-P[48233]-T[48251]-[Info ]-2024-04-08 10:38:13-P[48233]-T[48247]-[Info ]-PrintNums : 112.
2024-04-08 10:38:13-P[48233]-T[48239]-[Info ]-Producer : 39.
2024-04-08 10:38:13-P[48233]-T[48253]-[Info ]-PrintNums : 39.
2024-04-08 10:38:13-P[48233]-T[48241]-[Info ]-Producer : 40.
2024-04-08 10:38:13-P[48233]-T[48250]-[Info ]-PrintNums : 40.
2024-04-08 10:38:13-P[48233]-T[48241]-[Info ]-Producer : 41.
2024-04-08 10:38:13-P[48233]-T[48250]-[Info ]-PrintNums : 41.
2024-04-08 10:38:13-P[48233]-T[48241]-[Info ]-Producer : 42.
2024-04-08 10:38:13-P[48233]-T[48248]-[Info ]-PrintNums : 42.
2024-04-08 10:38:13-P[48233]-T[48241]-[Info ]-Producer : 43.
2024-04-08 10:38:13-P[48233]-T[48248]-[Info ]-PrintNums : 43.
2024-04-08 10:38:13-P[48233]-T[48241]-[Info ]-Producer : 44.
2024-04-08 10:38:13-P[48233]-T[48248]-[Info ]-PrintNums : 44.
2024-04-08 10:38:13-P[48233]-T[48241]-[Info ]-Producer : 45.
2024-04-08 10:38:13-P[48233]-T[48248]-[Info ]-PrintNums : 45.
2024-04-08 10:38:13-P[48233]-T[48241]-[Info ]-Producer : 46.
2024-04-08 10:38:13-P[48233]-T[48249]-[Info ]-PrintNums : 46.
2024-04-08 10:38:13-P[48233]-T[48241]-[Info ]-Producer : 47.
2024-04-08 10:38:13-P[48233]-T[48246]-[Info ]-PrintNums : 47.
2024-04-08 10:38:13-P[48233]-T[48241]-[Info ]-Producer : 48.
2024-04-08 10:38:13-P[48233]-T[48252]-[Info ]-PrintNums : 48.
2024-04-08 10:38:13-P[48233]-T[48241]-[Info ]-Producer : 49.
2024-04-08 10:38:13-P[48233]-T[48247]-[Info ]-PrintNums : 49.
2024-04-08 10:38:13-P[48233]-T[48241]-[Info ]-Producer : 50.
2024-04-08 10:38:13-P[48233]-T[48247]-[Info ]-PrintNums : 50.
2024-04-08 10:38:13-P[48233]-T[48241]-[Info ]-Producer : 51.
2024-04-08 10:38:13-P[48233]-T[48252]-[Info ]-PrintNums : 51.
2024-04-08 10:38:13-P[48233]-T[48241]-[Info ]-Producer : 52.
2024-04-08 10:38:13-P[48233]-T[48248]-[Info ]-PrintNums : 52.
2024-04-08 10:38:13-P[48233]-T[48241]-[Info ]-Producer : 53.
2024-04-08 10:38:13-P[48233]-T[48249]-[Info ]-PrintNums : 53.
2024-04-08 10:38:13-P[48233]-T[48241]-[Info ]-Producer : 54.
2024-04-08 10:38:13-P[48233]-T[48251]-[Info ]-PrintNums : 54.
2024-04-08 10:38:13-P[48233]-T[48241]-[Info ]-Producer : 55.
2024-04-08 10:38:13-P[48233]-T[48245]-[Info ]-PrintNums : 55.
2024-04-08 10:38:13-P[48233]-T[48241]-[Info ]-Producer : 56.
2024-04-08 10:38:13-P[48233]-T[48251]-[Info ]-PrintNums : 56.
2024-04-08 10:38:13-P[48233]-T[48241]-[Info ]-Producer : 57.
2024-04-08 10:38:13-P[48233]-T[48254]-[Info ]-PrintNums : 57.
2024-04-08 10:38:13-P[48233]-T[48241]-[Info ]-Producer : 58.
2024-04-08 10:38:13-P[48233]-T[48251]-[Info ]-PrintNums : 58.
2024-04-08 10:38:13-P[48233]-T[48241]-[Info ]-Producer : 59.
2024-04-08 10:38:13-P[48233]-T[48254]-[Info ]-PrintNums : 59.
2024-04-08 10:38:13-P[48233]-T[48243]-[Info ]-Producer : 60.
2024-04-08 10:38:13-P[48233]-T[48245]-[Info ]-PrintNums : 60.
2024-04-08 10:38:13-P[48233]-T[48243]-[Info ]-Producer : 61.
2024-04-08 10:38:13-P[48233]-T[48245]-[Info ]-PrintNums : 61.
2024-04-08 10:38:13-P[48233]-T[48243]-[Info ]-Producer : 62.
2024-04-08 10:38:13-P[48233]-T[48245]-[Info ]-PrintNums : 62.
2024-04-08 10:38:13-P[48233]-T[48243]-[Info ]-Producer : 63.
2024-04-08 10:38:13-P[48233]-T[48245]-[Info ]-PrintNums : 63.
2024-04-08 10:38:13-P[48233]-T[48243]-[Info ]-Producer : 64.
2024-04-08 10:38:13-P[48233]-T[48245]-[Info ]-PrintNums : 64.
2024-04-08 10:38:13-P[48233]-T[48243]-[Info ]-Producer : 65.
2024-04-08 10:38:13-P[48233]-T[48245]-[Info ]-PrintNums : 65.
2024-04-08 10:38:13-P[48233]-T[48243]-[Info ]-Producer : 66.
2024-04-08 10:38:13-P[48233]-T[48245]-[Info ]-PrintNums : 66.
2024-04-08 10:38:13-P[48233]-T[48243]-[Info ]-Producer : 67.
2024-04-08 10:38:13-P[48233]-T[48245]-[Info ]-PrintNums : 67.
2024-04-08 10:38:13-P[48233]-T[48243]-[Info ]-Producer : 68.
2024-04-08 10:38:13-P[48233]-T[48248]-[Info ]-PrintNums : 68.
2024-04-08 10:38:13-P[48233]-T[48243]-[Info ]-Producer : 69.
2024-04-08 10:38:13-P[48233]-T[48248]-[Info ]-PrintNums : 69.
2024-04-08 10:38:13-P[48233]-T[48243]-[Info ]-Producer : 70.
2024-04-08 10:38:13-P[48233]-T[48248]-[Info ]-PrintNums : 70.
2024-04-08 10:38:13-P[48233]-T[48243]-[Info ]-Producer : 71.
2024-04-08 10:38:13-P[48233]-T[48248]-[Info ]-PrintNums : 71.
2024-04-08 10:38:13-P[48233]-T[48243]-[Info ]-Producer : 72.
2024-04-08 10:38:13-P[48233]-T[48248]-[Info ]-PrintNums : 72.
2024-04-08 10:38:13-P[48233]-T[48243]-[Info ]-Producer : 73.
2024-04-08 10:38:13-P[48233]-T[48248]-[Info ]-PrintNums : 73.
2024-04-08 10:38:13-P[48233]-T[48243]-[Info ]-Producer : 74.
2024-04-08 10:38:13-P[48233]-T[48248]-[Info ]-PrintNums : 74.
2024-04-08 10:38:13-P[48233]-T[48243]-[Info ]-Producer : 75.
2024-04-08 10:38:13-P[48233]-T[48248]-[Info ]-PrintNums : 75.
2024-04-08 10:38:13-P[48233]-T[48243]-[Info ]-Producer : 76.
2024-04-08 10:38:13-P[48233]-T[48251]-[Info ]-PrintNums : 76.
2024-04-08 10:38:13-P[48233]-T[48243]-[Info ]-Producer : 77.
2024-04-08 10:38:13-P[48233]-T[48251]-[Info ]-PrintNums : 77.
2024-04-08 10:38:13-P[48233]-T[48243]-[Info ]-Producer : 78.
2024-04-08 10:38:13-P[48233]-T[48252]-[Info ]-PrintNums : 78.
2024-04-08 10:38:13-P[48233]-T[48243]-[Info ]-Producer : 79.
2024-04-08 10:38:13-P[48233]-T[48249]-[Info ]-PrintNums : 79.
2024-04-08 10:38:13-P[48233]-T[48235]-[Info ]-Producer : 80.
2024-04-08 10:38:13-P[48233]-T[48247]-[Info ]-PrintNums : 80.
2024-04-08 10:38:13-P[48233]-T[48235]-[Info ]-Producer : 81.
2024-04-08 10:38:13-P[48233]-T[48247]-[Info ]-PrintNums : 81.
2024-04-08 10:38:13-P[48233]-T[48235]-[Info ]-Producer : 82.
2024-04-08 10:38:13-P[48233]-T[48253]-[Info ]-PrintNums : 82.
2024-04-08 10:38:13-P[48233]-T[48235]-[Info ]-Producer : 83.
2024-04-08 10:38:13-P[48233]-T[48253]-[Info ]-PrintNums : 83.
2024-04-08 10:38:13-P[48233]-T[48235]-[Info ]-Producer : 84.
2024-04-08 10:38:13-P[48233]-T[48252]-[Info ]-PrintNums : 84.
2024-04-08 10:38:13-P[48233]-T[48235]-[Info ]-Producer : 85.
2024-04-08 10:38:13-P[48233]-T[48245]-[Info ]-PrintNums : 85.
2024-04-08 10:38:13-P[48233]-T[48235]-[Info ]-Producer : 86.
2024-04-08 10:38:13-P[48233]-T[48246]-[Info ]-PrintNums : 86.
2024-04-08 10:38:13-P[48233]-T[48235]-[Info ]-Producer : 87.
2024-04-08 10:38:13-P[48233]-T[48247]-[Info ]-PrintNums : 87.
2024-04-08 10:38:13-P[48233]-T[48235]-[Info ]-Producer : 88.
2024-04-08 10:38:13-P[48233]-T[48254]-[Info ]-PrintNums : 88.
2024-04-08 10:38:13-P[48233]-T[48235]-[Info ]-Producer : 89.
2024-04-08 10:38:13-P[48233]-T[48250]-[Info ]-PrintNums : 89.
2024-04-08 10:38:13-P[48233]-T[48235]-[Info ]-Producer : 90.
2024-04-08 10:38:13-P[48233]-T[48254]-[Info ]-PrintNums : 90.
2024-04-08 10:38:13-P[48233]-T[48235]-[Info ]-Producer : 91.
2024-04-08 10:38:13-P[48233]-T[48254]-[Info ]-PrintNums : 91.
2024-04-08 10:38:13-P[48233]-T[48235]-[Info ]-Producer : 92.
2024-04-08 10:38:13-P[48233]-T[48254]-[Info ]-PrintNums : 92.
2024-04-08 10:38:13-P[48233]-T[48235]-[Info ]-Producer : 93.
2024-04-08 10:38:13-P[48233]-T[48250]-[Info ]-PrintNums : 93.
2024-04-08 10:38:13-P[48233]-T[48235]-[Info ]-Producer : 94.
2024-04-08 10:38:13-P[48233]-T[48254]-[Info ]-PrintNums : 94.
2024-04-08 10:38:13-P[48233]-T[48235]-[Info ]-Producer : 95.
2024-04-08 10:38:13-P[48233]-T[48251]-[Info ]-PrintNums : 95.
2024-04-08 10:38:13-P[48233]-T[48235]-[Info ]-Producer : 96.
2024-04-08 10:38:13-P[48233]-T[48247]-[Info ]-PrintNums : 96.
2024-04-08 10:38:13-P[48233]-T[48235]-[Info ]-Producer : 97.
2024-04-08 10:38:13-P[48233]-T[48246]-[Info ]-PrintNums : 97.
2024-04-08 10:38:13-P[48233]-T[48235]-[Info ]-Producer : 98.
2024-04-08 10:38:13-P[48233]-T[48250]-[Info ]-PrintNums : 98.
2024-04-08 10:38:13-P[48233]-T[48235]-[Info ]-Producer : 99.
2024-04-08 10:38:13-P[48233]-T[48251]-[Info ]-PrintNums : 99.
2024-04-08 10:38:13-P[48233]-T[48244]-[Info ]-Producer : 100.
2024-04-08 10:38:13-P[48233]-T[48246]-[Info ]-PrintNums : 100.
2024-04-08 10:38:13-P[48233]-T[48244]-[Info ]-Producer : 101.
2024-04-08 10:38:13-P[48233]-T[48246]-[Info ]-PrintNums : 101.
2024-04-08 10:38:13-P[48233]-T[48244]-[Info ]-Producer : 102.
2024-04-08 10:38:13-P[48233]-T[48246]-[Info ]-PrintNums : 102.
2024-04-08 10:38:13-P[48233]-T[48244]-[Info ]-Producer : 103.
2024-04-08 10:38:13-P[48233]-T[48246]-[Info ]-PrintNums : 103.
2024-04-08 10:38:13-P[48233]-T[48244]-[Info ]-Producer : 104.
2024-04-08 10:38:13-P[48233]-T[48246]-[Info ]-PrintNums : 104.
2024-04-08 10:38:13-P[48233]-T[48244]-[Info ]-Producer : 105.
2024-04-08 10:38:13-P[48233]-T[48246]-[Info ]-PrintNums : 105.
2024-04-08 10:38:13-P[48233]-T[48244]-[Info ]-Producer : 106.
2024-04-08 10:38:13-P[48233]-T[48246]-[Info ]-PrintNums : 106.
2024-04-08 10:38:13-P[48233]-T[48244]-[Info ]-Producer : 107.
2024-04-08 10:38:13-P[48233]-T[48246]-[Info ]-PrintNums : 107.
2024-04-08 10:38:13-P[48233]-T[48244]-[Info ]-Producer : 108.
2024-04-08 10:38:13-P[48233]-T[48248]-[Info ]-PrintNums : 108.
2024-04-08 10:38:13-P[48233]-T[48244]-[Info ]-Producer : 109.
2024-04-08 10:38:13-P[48233]-T[48254]-[Info ]-PrintNums : 109.
2024-04-08 10:38:13-P[48233]-T[48244]-[Info ]-Producer : 110.
2024-04-08 10:38:13-P[48233]-T[48252]-[Info ]-PrintNums : 110.
2024-04-08 10:38:13-P[48233]-T[48244]-[Info ]-Producer : 111.
2024-04-08 10:38:13-P[48233]-T[48247]-[Info ]-PrintNums : 111.
2024-04-08 10:38:13-P[48233]-T[48244]-[Info ]-Producer : 112.
2024-04-08 10:38:13-P[48233]-T[48244]-[Info ]-Producer : 113.
2024-04-08 10:38:13-P[48233]-T[48251]-[Info ]-PrintNums : 113.
2024-04-08 10:38:13-P[48233]-T[48244]-[Info ]-Producer : 114.
2024-04-08 10:38:13-P[48233]-T[48247]-[Info ]-PrintNums : 114.
2024-04-08 10:38:13-P[48233]-T[48244]-[Info ]-Producer : 115.
2024-04-08 10:38:13-P[48233]-T[48245]-[Info ]-PrintNums : 115.
2024-04-08 10:38:13-P[48233]-T[48244]-[Info ]-Producer : 116.
2024-04-08 10:38:13-P[48233]-T[48247]-[Info ]-PrintNums : 116.
2024-04-08 10:38:13-P[48233]-T[48244]-[Info ]-Producer : 117.
2024-04-08 10:38:13-P[48233]-T[48246]-[Info ]-PrintNums : 117.
2024-04-08 10:38:13-P[48233]-T[48244]-[Info ]-Producer : 118.
2024-04-08 10:38:13-P[48233]-T[48245]-[Info ]-PrintNums : 118.
2024-04-08 10:38:13-P[48233]-T[48244]-[Info ]-Producer : 119.
2024-04-08 10:38:13-P[48233]-T[48246]-[Info ]-PrintNums : 119.
2024-04-08 10:38:13-P[48233]-T[48236]-[Info ]-Producer : 120.
2024-04-08 10:38:13-P[48233]-T[48254]-[Info ]-PrintNums : 120.
2024-04-08 10:38:13-P[48233]-T[48236]-[Info ]-Producer : 121.
2024-04-08 10:38:13-P[48233]-T[48254]-[Info ]-PrintNums : 121.
2024-04-08 10:38:13-P[48233]-T[48236]-[Info ]-Producer : 122.
2024-04-08 10:38:13-P[48233]-T[48254]-[Info ]-PrintNums : 122.
2024-04-08 10:38:13-P[48233]-T[48236]-[Info ]-Producer : 123.
2024-04-08 10:38:13-P[48233]-T[48250]-[Info ]-PrintNums : 123.
2024-04-08 10:38:13-P[48233]-T[48236]-[Info ]-Producer : 124.
2024-04-08 10:38:13-P[48233]-T[48253]-[Info ]-PrintNums : 124.
2024-04-08 10:38:13-P[48233]-T[48236]-[Info ]-Producer : 125.
2024-04-08 10:38:13-P[48233]-T[48252]-[Info ]-PrintNums : 125.
2024-04-08 10:38:13-P[48233]-T[48236]-[Info ]-Producer : 126.
2024-04-08 10:38:13-P[48233]-T[48252]-[Info ]-PrintNums : 126.
2024-04-08 10:38:13-P[48233]-T[48236]-[Info ]-Producer : 127.
2024-04-08 10:38:13-P[48233]-T[48253]-[Info ]-PrintNums : 127.
2024-04-08 10:38:13-P[48233]-T[48236]-[Info ]-Producer : 128.
2024-04-08 10:38:13-P[48233]-T[48248]-[Info ]-PrintNums : 128.
2024-04-08 10:38:13-P[48233]-T[48236]-[Info ]-Producer : 129.
2024-04-08 10:38:13-P[48233]-T[48247]-[Info ]-PrintNums : 129.
2024-04-08 10:38:13-P[48233]-T[48236]-[Info ]-Producer : 130.
2024-04-08 10:38:13-P[48233]-T[48246]-[Info ]-PrintNums : 130.
2024-04-08 10:38:13-P[48233]-T[48236]-[Info ]-Producer : 131.
2024-04-08 10:38:13-P[48233]-T[48252]-[Info ]-PrintNums : 131.
2024-04-08 10:38:13-P[48233]-T[48236]-[Info ]-Producer : 132.
2024-04-08 10:38:13-P[48233]-T[48248]-[Info ]-PrintNums : 132.
2024-04-08 10:38:13-P[48233]-T[48236]-[Info ]-Producer : 133.
2024-04-08 10:38:13-P[48233]-T[48250]-[Info ]-PrintNums : 133.
2024-04-08 10:38:13-P[48233]-T[48236]-[Info ]-Producer : 134.
2024-04-08 10:38:13-P[48233]-T[48250]-[Info ]-PrintNums : 134.
2024-04-08 10:38:13-P[48233]-T[48236]-[Info ]-Producer : 135.
2024-04-08 10:38:13-P[48233]-T[48248]-[Info ]-PrintNums : 135.
2024-04-08 10:38:13-P[48233]-T[48236]-[Info ]-Producer : 136.
2024-04-08 10:38:13-P[48233]-T[48248]-[Info ]-PrintNums : 136.
2024-04-08 10:38:13-P[48233]-T[48236]-[Info ]-Producer : 137.
2024-04-08 10:38:13-P[48233]-T[48252]-[Info ]-PrintNums : 137.
2024-04-08 10:38:13-P[48233]-T[48236]-[Info ]-Producer : 138.
2024-04-08 10:38:13-P[48233]-T[48248]-[Info ]-PrintNums : 138.
2024-04-08 10:38:13-P[48233]-T[48236]-[Info ]-Producer : 139.
2024-04-08 10:38:13-P[48233]-T[48248]-[Info ]-PrintNums : 139.
2024-04-08 10:38:13-P[48233]-T[48238]-[Info ]-Producer : 140.
2024-04-08 10:38:13-P[48233]-T[48248]-[Info ]-PrintNums : 140.
2024-04-08 10:38:13-P[48233]-T[48238]-[Info ]-Producer : 141.
2024-04-08 10:38:13-P[48233]-T[48248]-[Info ]-PrintNums : 141.
2024-04-08 10:38:13-P[48233]-T[48238]-[Info ]-Producer : 142.
2024-04-08 10:38:13-P[48233]-T[48249]-[Info ]-PrintNums : 142.
2024-04-08 10:38:13-P[48233]-T[48238]-[Info ]-Producer : 143.
2024-04-08 10:38:13-P[48233]-T[48247]-[Info ]-PrintNums : 143.
2024-04-08 10:38:13-P[48233]-T[48238]-[Info ]-Producer : 144.
2024-04-08 10:38:13-P[48233]-T[48253]-[Info ]-PrintNums : 144.
2024-04-08 10:38:13-P[48233]-T[48238]-[Info ]-Producer : 145.
2024-04-08 10:38:13-P[48233]-T[48246]-[Info ]-PrintNums : 145.
2024-04-08 10:38:13-P[48233]-T[48238]-[Info ]-Producer : 146.
2024-04-08 10:38:13-P[48233]-T[48248]-[Info ]-PrintNums : 146.
2024-04-08 10:38:13-P[48233]-T[48238]-[Info ]-Producer : 147.
2024-04-08 10:38:13-P[48233]-T[48251]-[Info ]-PrintNums : 147.
2024-04-08 10:38:13-P[48233]-T[48238]-[Info ]-Producer : 148.
2024-04-08 10:38:13-P[48233]-T[48250]-[Info ]-PrintNums : 148.
2024-04-08 10:38:13-P[48233]-T[48238]-[Info ]-Producer : 149.
2024-04-08 10:38:13-P[48233]-T[48254]-[Info ]-PrintNums : 149.
2024-04-08 10:38:13-P[48233]-T[48238]-[Info ]-Producer : 150.
2024-04-08 10:38:13-P[48233]-T[48251]-[Info ]-PrintNums : 150.
2024-04-08 10:38:13-P[48233]-T[48238]-[Info ]-Producer : 151.
2024-04-08 10:38:13-P[48233]-T[48253]-[Info ]-PrintNums : 151.
2024-04-08 10:38:13-P[48233]-T[48238]-[Info ]-Producer : 152.
2024-04-08 10:38:13-P[48233]-T[48246]-[Info ]-PrintNums : 152.
2024-04-08 10:38:13-P[48233]-T[48238]-[Info ]-Producer : 153.
2024-04-08 10:38:13-P[48233]-T[48248]-[Info ]-PrintNums : 153.
2024-04-08 10:38:13-P[48233]-T[48238]-[Info ]-Producer : 154.
2024-04-08 10:38:13-P[48233]-T[48250]-[Info ]-PrintNums : 154.
2024-04-08 10:38:13-P[48233]-T[48238]-[Info ]-Producer : 155.
2024-04-08 10:38:13-P[48233]-T[48238]-[Info ]-Producer : 156.
2024-04-08 10:38:13-P[48233]-T[48249]-[Info ]-PrintNums : 156.
2024-04-08 10:38:13-P[48233]-T[48238]-[Info ]-Producer : 157.
2024-04-08 10:38:13-P[48233]-T[48247]-[Info ]-PrintNums : 157.
2024-04-08 10:38:13-P[48233]-T[48238]-[Info ]-Producer : 158.
2024-04-08 10:38:13-P[48233]-T[48254]-[Info ]-PrintNums : 158.
2024-04-08 10:38:13-P[48233]-T[48238]-[Info ]-Producer : 159.
2024-04-08 10:38:13-P[48233]-T[48250]-[Info ]-PrintNums : 159.
2024-04-08 10:38:13-P[48233]-T[48240]-[Info ]-Producer : 160.
2024-04-08 10:38:13-P[48233]-T[48254]-[Info ]-PrintNums : 160.
2024-04-08 10:38:13-P[48233]-T[48240]-[Info ]-Producer : 161.
2024-04-08 10:38:13-P[48233]-T[48249]-[Info ]-PrintNums : 161.
2024-04-08 10:38:13-P[48233]-T[48240]-[Info ]-Producer : 162.
2024-04-08 10:38:13-P[48233]-T[48254]-[Info ]-PrintNums : 162.
2024-04-08 10:38:13-P[48233]-T[48240]-[Info ]-Producer : 163.
2024-04-08 10:38:13-P[48233]-T[48252]-[Info ]-PrintNums : 163.
2024-04-08 10:38:13-P[48233]-T[48240]-[Info ]-Producer : 164.
2024-04-08 10:38:13-P[48233]-T[48249]-[Info ]-PrintNums : 164.
2024-04-08 10:38:13-P[48233]-T[48240]-[Info ]-Producer : 165.
2024-04-08 10:38:13-P[48233]-T[48252]-[Info ]-PrintNums : 165.
2024-04-08 10:38:13-P[48233]-T[48240]-[Info ]-Producer : 166.
2024-04-08 10:38:13-P[48233]-T[48248]-[Info ]-PrintNums : 166.
2024-04-08 10:38:13-P[48233]-T[48240]-[Info ]-Producer : 167.
2024-04-08 10:38:13-P[48233]-T[48248]-[Info ]-PrintNums : 167.
2024-04-08 10:38:13-P[48233]-T[48240]-[Info ]-Producer : 168.
2024-04-08 10:38:13-P[48233]-T[48251]-[Info ]-PrintNums : 168.
2024-04-08 10:38:13-P[48233]-T[48240]-[Info ]-Producer : 169.
2024-04-08 10:38:13-P[48233]-T[48251]-[Info ]-PrintNums : 169.
2024-04-08 10:38:13-P[48233]-T[48240]-[Info ]-Producer : 170.
2024-04-08 10:38:13-P[48233]-T[48246]-[Info ]-PrintNums : 170.
2024-04-08 10:38:13-P[48233]-T[48240]-[Info ]-Producer : 171.
2024-04-08 10:38:13-P[48233]-T[48246]-[Info ]-PrintNums : 171.
2024-04-08 10:38:13-P[48233]-T[48240]-[Info ]-Producer : 172.
2024-04-08 10:38:13-P[48233]-T[48251]-[Info ]-PrintNums : 172.
2024-04-08 10:38:13-P[48233]-T[48240]-[Info ]-Producer : 173.
2024-04-08 10:38:13-P[48233]-T[48252]-[Info ]-PrintNums : 173.
2024-04-08 10:38:13-P[48233]-T[48240]-[Info ]-Producer : 174.
2024-04-08 10:38:13-P[48233]-T[48250]-[Info ]-PrintNums : 174.
2024-04-08 10:38:13-P[48233]-T[48240]-[Info ]-Producer : 175.
2024-04-08 10:38:13-P[48233]-T[48246]-[Info ]-PrintNums : 175.
2024-04-08 10:38:13-P[48233]-T[48240]-[Info ]-Producer : 176.
2024-04-08 10:38:13-P[48233]-T[48245]-[Info ]-PrintNums : 176.
2024-04-08 10:38:13-P[48233]-T[48240]-[Info ]-Producer : 177.
2024-04-08 10:38:13-P[48233]-T[48249]-[Info ]-PrintNums : 177.
2024-04-08 10:38:13-P[48233]-T[48240]-[Info ]-Producer : 178.
2024-04-08 10:38:13-P[48233]-T[48253]-[Info ]-PrintNums : 178.
2024-04-08 10:38:13-P[48233]-T[48240]-[Info ]-Producer : 179.
2024-04-08 10:38:13-P[48233]-T[48251]-[Info ]-PrintNums : 179.
2024-04-08 10:38:13-P[48233]-T[48242]-[Info ]-Producer : 180.
2024-04-08 10:38:13-P[48233]-T[48245]-[Info ]-PrintNums : 180.
2024-04-08 10:38:13-P[48233]-T[48242]-[Info ]-Producer : 181.
2024-04-08 10:38:13-P[48233]-T[48246]-[Info ]-PrintNums : 181.
2024-04-08 10:38:13-P[48233]-T[48242]-[Info ]-Producer : 182.
2024-04-08 10:38:13-P[48233]-T[48253]-[Info ]-PrintNums : 182.
2024-04-08 10:38:13-P[48233]-T[48242]-[Info ]-Producer : 183.
2024-04-08 10:38:13-P[48233]-T[48254]-[Info ]-PrintNums : 183.
2024-04-08 10:38:13-P[48233]-T[48242]-[Info ]-Producer : 184.
2024-04-08 10:38:13-P[48233]-T[48254]-[Info ]-PrintNums : 184.
2024-04-08 10:38:13-P[48233]-T[48242]-[Info ]-Producer : 185.
2024-04-08 10:38:13-P[48233]-T[48250]-[Info ]-PrintNums : 185.
2024-04-08 10:38:13-P[48233]-T[48242]-[Info ]-Producer : 186.
2024-04-08 10:38:13-P[48233]-T[48249]-[Info ]-PrintNums : 186.
2024-04-08 10:38:13-P[48233]-T[48242]-[Info ]-Producer : 187.
2024-04-08 10:38:13-P[48233]-T[48252]-[Info ]-PrintNums : 187.
2024-04-08 10:38:13-P[48233]-T[48242]-[Info ]-Producer : 188.
2024-04-08 10:38:13-P[48233]-T[48252]-[Info ]-PrintNums : 188.
2024-04-08 10:38:13-P[48233]-T[48242]-[Info ]-Producer : 189.
2024-04-08 10:38:13-P[48233]-T[48253]-[Info ]-PrintNums : 189.
2024-04-08 10:38:13-P[48233]-T[48242]-[Info ]-Producer : 190.
2024-04-08 10:38:13-P[48233]-T[48253]-[Info ]-PrintNums : 190.
2024-04-08 10:38:13-P[48233]-T[48242]-[Info ]-Producer : 191.
2024-04-08 10:38:13-P[48233]-T[48247]-[Info ]-PrintNums : 191.
2024-04-08 10:38:13-P[48233]-T[48242]-[Info ]-Producer : 192.
2024-04-08 10:38:13-P[48233]-T[48251]-[Info ]-PrintNums : 192.
2024-04-08 10:38:13-P[48233]-T[48242]-[Info ]-Producer : 193.
2024-04-08 10:38:13-P[48233]-T[48250]-[Info ]-PrintNums : 193.
2024-04-08 10:38:13-P[48233]-T[48242]-[Info ]-Producer : 194.
2024-04-08 10:38:13-P[48233]-T[48251]-[Info ]-PrintNums : 194.
2024-04-08 10:38:13-P[48233]-T[48242]-[Info ]-Producer : 195.
2024-04-08 10:38:13-P[48233]-T[48246]-[Info ]-PrintNums : 195.
2024-04-08 10:38:13-P[48233]-T[48242]-[Info ]-Producer : 196.
2024-04-08 10:38:13-P[48233]-T[48253]-[Info ]-PrintNums : 196.
2024-04-08 10:38:13-P[48233]-T[48242]-[Info ]-Producer : 197.
2024-04-08 10:38:13-P[48233]-T[48253]-[Info ]-PrintNums : 197.
2024-04-08 10:38:13-P[48233]-T[48242]-[Info ]-Producer : 198.
2024-04-08 10:38:13-P[48233]-T[48247]-[Info ]-PrintNums : 198.
2024-04-08 10:38:13-P[48233]-T[48242]-[Info ]-Producer : 199.
2024-04-08 10:38:13-P[48233]-T[48246]-[Info ]-PrintNums : 199.
2、char[]类型
只是数字后面拼接了字符串。代码进行了些许调整。
(1)Demo
cpp
#include "ThreadPool.h"
#define TEST_CONSUMER_THREAD_NUM 10
#define TEST_PRODUCER_THREAD_NUM 10
#define TEST_INTERVAL_VAL 20
#define PRODUCER_SUM_VAL (TEST_PRODUCER_THREAD_NUM * TEST_INTERVAL_VAL)
#define CONSUMER_VAL (PRODUCER_SUM_VAL / TEST_CONSUMER_THREAD_NUM)
#define TEST_STR_DATA_SUFFIX "I am a happy little angel. "
#define TEST_STR_DATA_PREFIX_LEN 100
#define QUEUE_LEN 8
#define GLOBAL_ARRAY_COL_NUM 2
#define GLOBAL_ARRAY_ROW_NUM TEST_PRODUCER_THREAD_NUM
int GlobalArray[GLOBAL_ARRAY_ROW_NUM][GLOBAL_ARRAY_COL_NUM];
typedef struct ToatalSt
{
ThrdPool *Pool;
int AccessIndex;
OneThrdMutexSt *Mutex;
}ToatalSt;
Status PrintNums(void* Arg)
{
LogFormat(Info,"PrintStr : %s.\n",((CopyStr *)Arg)->String);
return SUCCESS_FLAG;
}
void* Producer(void* Arg)
{
int i;
int j = 0;
int Idx;
ToatalSt *Total = (ToatalSt *)Arg;
TaskGrpSt **TaskGrpArry = (TaskGrpSt **)MyMalloc(sizeof(TaskGrpSt *) * INIT_TASK_GRP_NUMS);
TaskSt *TaskArray = (TaskSt*)MyMalloc(sizeof(TaskSt) * INIT_TASK_GRP_NUMS);
int TestDataLen = strlen(TEST_STR_DATA_SUFFIX);
THRD_MUTEX_LOCK_F(Total->Mutex);
Idx = Total->AccessIndex;
Total->AccessIndex++;
THRD_MUTEX_UNLOCK_F(Total->Mutex);
for (i = 0; i < INIT_TASK_GRP_NUMS; i++)
{
//初始化失败的话,会内存泄露,后面改进。
if(TaskGrpInit(&(TaskGrpArry[i]), 1, TASK_RETRY_TIMES) != SUCCESS_FLAG)
{
goto ERR_STAGE;
}
TaskArray[i].Func = PrintNums;
InitCopyStrDefLen((CopyStr**)(&(TaskArray[i].Arg)),TestDataLen + TEST_STR_DATA_PREFIX_LEN);
TaskArray[i].State = TASK_INIT_STATE;
TaskGrpAddTask(TaskGrpArry[i], &(TaskArray[i]));
}
for ( i = GlobalArray[Idx][0]; i < GlobalArray[Idx][1]; i++)
{
SCAN_REC_STAGE:
for (; j < INIT_TASK_GRP_NUMS; j++)//避免每次从头扫描数组,提升效率。
{
THRD_RW_LOCK_READ_LOCK_F(TaskGrpArry[j]->StateRwLock);
if (TaskGrpArry[j]->State == TASK_GRP_END_STATE ||
TaskGrpArry[j]->State == TASK_GRP_INIT_STATE)//有任务结束或任务空间未使用。
{
THRD_RW_LOCK_UNLOCK_F(TaskGrpArry[j]->StateRwLock);
break;
}
THRD_RW_LOCK_UNLOCK_F(TaskGrpArry[j]->StateRwLock);
}
if (j >= INIT_TASK_GRP_NUMS)//说明没有可用空间
{
j = 0;
goto SCAN_REC_STAGE;//继续扫描数据查看是否有空间腾出。
}
//从数据库中抽取x万条数据。
ClearCopyStr(TaskArray[j].Arg,0);
sprintf(((CopyStr*)(TaskArray[j].Arg))->String,"%d",i);
((CopyStr*)(TaskArray[j].Arg))->StrEffectiveLen = strlen(((CopyStr*)(TaskArray[j].Arg))->String);
ExecCopyStr(TaskArray[j].Arg," ");
ExecCopyStr(TaskArray[j].Arg,TEST_STR_DATA_SUFFIX);
//将任务组压入线程池中。
LogFormat(Info,"Producer : %s.\n",((CopyStr*)(TaskArray[j].Arg))->String);
ThrdPoolAddTaskGrp(Total->Pool, TaskGrpArry[j]);
j++;//防止重复扫描数据。
if (j >= INIT_TASK_GRP_NUMS)
{
j = 0;
}
}
//由于数据是存储在生产者线程中的,所以可能出现任务下发完了,但消费者还没有完成任务。
//需要等所有任务完成。
THRD_BARRIER_WAIT_F(Total->Pool->ProducerBarrier);
THRD_BARRIER_WAIT_F(Total->Pool->AllBarrier);
//释放资源
for (i = 0; i < INIT_TASK_GRP_NUMS; i++)
{
if(TaskGrpDstry(&(TaskGrpArry[i])) != SUCCESS_FLAG)
{
goto ERR_STAGE;
}
DestroyCopyStr((CopyStr**)(&(TaskArray[i].Arg)));
TaskArray[i].Func = NULL;
TaskArray[i].State = TASK_INIT_STATE;
}
free(TaskGrpArry);
free(TaskArray);
TaskGrpArry = NULL;
TaskArray = NULL;
THRD_EXIT(SUCCESS_FLAG);
ERR_STAGE:
THRD_EXIT(FAIL_FLAG);
}
Status main()
{
int i;
ToatalSt Total;
OneThrdMutexCreate(&(Total.Mutex),
PTHREAD_PROCESS_PRIVATE,
PTHREAD_MUTEX_ERRORCHECK,
PTHREAD_MUTEX_STALLED,
2,
1);
Total.AccessIndex = 0;
for ( i = 0; i < GLOBAL_ARRAY_ROW_NUM; i++)
{
GlobalArray[i][0] = i * TEST_INTERVAL_VAL;
GlobalArray[i][1] = GlobalArray[i][0] + TEST_INTERVAL_VAL;
}
ThrdPoolInit(&(Total.Pool),
TEST_CONSUMER_THREAD_NUM,
TEST_PRODUCER_THREAD_NUM,
QUEUE_LEN,
Producer,
&Total);
ThrdPoolDstry(&(Total.Pool));
OneThrdMutexFree(&(Total.Mutex));
return SUCCESS_FLAG;
}
(2)编译
bash
[gbase@czg2 SqQueue]$ make clean
rm -rf TestSqQueue
rm -rf TestThreadQ
[gbase@czg2 SqQueue]$ make
gcc -Wall -Wextra -O3 -std=gnu11 TestThreadQ.c -o TestThreadQ -I /opt/Developer/ComputerLanguageStudy/C/DataStructureTestSrc/PublicFunction/ -I /opt/Developer/ComputerLanguageStudy/C/DataStructureTestSrc/Log/ -I /opt/Developer/ComputerLanguageStudy/C/DataStructureTestSrc/PublicFunction/Pthread/ -L /opt/Developer/ComputerLanguageStudy/C/DataStructureTestSrc/PublicFunction/Make/Libs/ -L /usr/lib64/ -l PublicFunction -l Log -l MyThread -l SqQueue
gcc -Wall -Wextra -O3 -std=gnu11 main.c -o TestSqQueue -I /opt/Developer/ComputerLanguageStudy/C/DataStructureTestSrc/PublicFunction/ -I /opt/Developer/ComputerLanguageStudy/C/DataStructureTestSrc/Log/ -I /opt/Developer/ComputerLanguageStudy/C/DataStructureTestSrc/PublicFunction/Pthread/ -L /opt/Developer/ComputerLanguageStudy/C/DataStructureTestSrc/PublicFunction/Make/Libs/ -L /usr/lib64/ -l PublicFunction -l Log -l MyThread -l SqQueue
(3)验证
消费者和生产者分别拿到了0-199,没有重复消费、多消费、少消费的情况发生,说明我们实现的正确。
bash
[gbase@czg2 MyPool]$ ./TestThreadPool |sort -t ":" -k 4 -n
2024-04-08 14:54:22-P[53852]-T[53856]-[Info ]-Producer : 0 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53864]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 14:54:22-P[53852]-T[53865]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 14:54:22-P[53852]-T[53866]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 14:54:22-P[53852]-T[53868]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 14:54:22-P[53852]-T[53869]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 14:54:22-P[53852]-T[53870]-[Info ]-PrintStr : 0 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53870]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 14:54:22-P[53852]-T[53872]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 14:54:22-P[53852]-T[53873]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
Producer : 15 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53856]-[Info ]-Producer : 1 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53868]-[Info ]-PrintStr : 1 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53856]-[Info ]-Producer : 2 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53869]-[Info ]-PrintStr : 2 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53856]-[Info ]-Producer : 3 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53871]-[Info ]-PrintStr : 3 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53856]-[Info ]-Producer : 4 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53868]-[Info ]-PrintStr : 4 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53856]-[Info ]-Producer : 5 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53867]-[Info ]-PrintStr : 5 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53856]-[Info ]-Producer : 6 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53866]-[Info ]-PrintStr : 6 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53856]-[Info ]-Producer : 7 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53866]-[Info ]-PrintStr : 7 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53856]-[Info ]-Producer : 8 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53866]-[Info ]-PrintStr : 8 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53856]-[Info ]-Producer : 9 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53856]-[Info ]-Producer : 10 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53866]-[Info ]-PrintStr : 10 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53856]-[Info ]-Producer : 11 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53869]-[Info ]-PrintStr : 11 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53856]-[Info ]-Producer : 12 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53865]-[Info ]-PrintStr : 12 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53856]-[Info ]-Producer : 13 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53865]-[Info ]-PrintStr : 13 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53856]-[Info ]-Producer : 14 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53865]-[Info ]-PrintStr : 14 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53864]-[Info ]-PrintStr : 15 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53856]-[Info ]-Producer : 16 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53868]-[Info ]-PrintStr : 16 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53856]-[Info ]-Producer : 17 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53872]-[Info ]-PrintStr : 17 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53856]-[Info ]-Producer : 18 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53869]-[Info ]-PrintStr : 18 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53856]-[Info ]-Producer : 19 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53872]-[Info ]-PrintStr : 19 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53859]-[Info ]-Producer : 20 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53870]-[Info ]-PrintStr : 20 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53859]-[Info ]-Producer : 21 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53869]-[Info ]-PrintStr : 21 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53859]-[Info ]-Producer : 22 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53868]-[Info ]-PrintStr : 22 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53859]-[Info ]-Producer : 23 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53872]-[Info ]-PrintStr : 23 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53859]-[Info ]-Producer : 24 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53865]-[Info ]-PrintStr : 24 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53859]-[Info ]-Producer : 25 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53865]-[Info ]-PrintStr : 25 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53859]-[Info ]-Producer : 26 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53867]-[Info ]-PrintStr : 26 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53859]-[Info ]-Producer : 27 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53867]-[Info ]-PrintStr : 27 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53859]-[Info ]-Producer : 28 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53866]-[Info ]-PrintStr : 28 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53859]-[Info ]-Producer : 29 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53866]-[Info ]-PrintStr : 29 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53859]-[Info ]-Producer : 30 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53866]-[Info ]-PrintStr : 30 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53859]-[Info ]-Producer : 31 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53868]-[Info ]-PrintStr : 31 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53859]-[Info ]-Producer : 32 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53868]-[Info ]-PrintStr : 32 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53859]-[Info ]-Producer : 33 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53865]-[Info ]-PrintStr : 33 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53859]-[Info ]-Producer : 34 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53867]-[Info ]-PrintStr : 34 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53859]-[Info ]-Producer : 35 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53867]-[Info ]-PrintStr : 35 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53859]-[Info ]-Producer : 36 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53867]-[Info ]-PrintStr : 36 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53859]-[Info ]-Producer : 37 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53868]-[Info ]-PrintStr : 37 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53859]-[Info ]-Producer : 38 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53871]-[Info ]-PrintStr : 38 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53859]-[Info ]-Producer : 39 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53864]-[Info ]-PrintStr : 39 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53858]-[Info ]-Producer : 40 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53870]-[Info ]-PrintStr : 40 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53858]-[Info ]-Producer : 41 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53869]-[Info ]-PrintStr : 41 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53858]-[Info ]-Producer : 42 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53871]-[Info ]-PrintStr : 42 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53858]-[Info ]-Producer : 43 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53869]-[Info ]-PrintStr : 43 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53858]-[Info ]-Producer : 44 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53864]-[Info ]-PrintStr : 44 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53858]-[Info ]-Producer : 45 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53871]-[Info ]-PrintStr : 45 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53858]-[Info ]-Producer : 46 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53871]-[Info ]-PrintStr : 46 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53858]-[Info ]-Producer : 47 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53867]-[Info ]-PrintStr : 47 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53858]-[Info ]-Producer : 48 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53868]-[Info ]-PrintStr : 48 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53858]-[Info ]-Producer : 49 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53866]-[Info ]-PrintStr : 49 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53858]-[Info ]-Producer : 50 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53866]-[Info ]-PrintStr : 50 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53858]-[Info ]-Producer : 51 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53865]-[Info ]-PrintStr : 51 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53858]-[Info ]-Producer : 52 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53867]-[Info ]-PrintStr : 52 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53858]-[Info ]-Producer : 53 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53864]-[Info ]-PrintStr : 53 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53856]-[Info ]-2024-04-08 14:54:22-P[53852]-T[53866]-[Info ]-PrintStr : 9 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53858]-[Info ]-Producer : 54 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53867]-[Info ]-PrintStr : 54 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53858]-[Info ]-Producer : 55 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53867]-[Info ]-PrintStr : 55 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53858]-[Info ]-Producer : 56 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53864]-[Info ]-PrintStr : 56 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53858]-[Info ]-Producer : 57 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53869]-[Info ]-PrintStr : 57 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53858]-[Info ]-Producer : 58 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53865]-[Info ]-PrintStr : 58 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53858]-[Info ]-Producer : 59 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53864]-[Info ]-PrintStr : 59 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53855]-[Info ]-Producer : 60 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53870]-[Info ]-PrintStr : 60 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53855]-[Info ]-Producer : 61 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53868]-[Info ]-PrintStr : 61 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53855]-[Info ]-Producer : 62 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53868]-[Info ]-PrintStr : 62 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53855]-[Info ]-Producer : 63 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53869]-[Info ]-PrintStr : 63 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53855]-[Info ]-Producer : 64 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53864]-[Info ]-PrintStr : 64 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53855]-[Info ]-Producer : 65 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53872]-[Info ]-PrintStr : 65 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53855]-[Info ]-Producer : 66 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53865]-[Info ]-PrintStr : 66 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53855]-[Info ]-Producer : 67 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53864]-[Info ]-PrintStr : 67 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53855]-[Info ]-Producer : 68 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53866]-[Info ]-PrintStr : 68 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53855]-[Info ]-Producer : 69 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53866]-[Info ]-PrintStr : 69 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53855]-[Info ]-Producer : 70 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53864]-[Info ]-PrintStr : 70 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53855]-[Info ]-Producer : 71 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53864]-[Info ]-PrintStr : 71 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53855]-[Info ]-Producer : 72 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53869]-[Info ]-PrintStr : 72 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53855]-[Info ]-Producer : 73 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53864]-[Info ]-PrintStr : 73 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53855]-[Info ]-Producer : 74 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53864]-[Info ]-PrintStr : 74 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53855]-[Info ]-Producer : 75 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53872]-[Info ]-PrintStr : 75 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53855]-[Info ]-Producer : 76 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53871]-[Info ]-PrintStr : 76 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53855]-[Info ]-Producer : 77 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53868]-[Info ]-PrintStr : 77 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53855]-[Info ]-Producer : 78 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53870]-[Info ]-PrintStr : 78 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53855]-[Info ]-Producer : 79 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53870]-[Info ]-PrintStr : 79 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53854]-[Info ]-Producer : 80 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53871]-[Info ]-PrintStr : 80 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53854]-[Info ]-Producer : 81 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53871]-[Info ]-PrintStr : 81 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53854]-[Info ]-Producer : 82 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53871]-[Info ]-PrintStr : 82 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53854]-[Info ]-Producer : 83 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53871]-[Info ]-PrintStr : 83 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53854]-[Info ]-Producer : 84 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53871]-[Info ]-PrintStr : 84 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53854]-[Info ]-Producer : 85 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53871]-[Info ]-PrintStr : 85 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53854]-[Info ]-Producer : 86 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53871]-[Info ]-PrintStr : 86 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53854]-[Info ]-Producer : 87 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53871]-[Info ]-PrintStr : 87 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53854]-[Info ]-Producer : 88 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53864]-[Info ]-PrintStr : 88 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53854]-[Info ]-Producer : 89 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53864]-[Info ]-PrintStr : 89 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53854]-[Info ]-Producer : 90 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53864]-[Info ]-PrintStr : 90 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53854]-[Info ]-Producer : 91 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53864]-[Info ]-PrintStr : 91 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53854]-[Info ]-Producer : 92 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53864]-[Info ]-PrintStr : 92 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53854]-[Info ]-Producer : 93 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53864]-[Info ]-PrintStr : 93 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53854]-[Info ]-Producer : 94 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53864]-[Info ]-PrintStr : 94 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53854]-[Info ]-Producer : 95 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53864]-[Info ]-PrintStr : 95 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53854]-[Info ]-Producer : 96 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53873]-[Info ]-PrintStr : 96 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53854]-[Info ]-Producer : 97 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53869]-[Info ]-PrintStr : 97 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53854]-[Info ]-Producer : 98 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53873]-[Info ]-PrintStr : 98 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53854]-[Info ]-Producer : 99 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53873]-[Info ]-PrintStr : 99 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53860]-[Info ]-Producer : 100 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53870]-[Info ]-PrintStr : 100 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53860]-[Info ]-Producer : 101 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53870]-[Info ]-PrintStr : 101 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53860]-[Info ]-Producer : 102 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53864]-[Info ]-PrintStr : 102 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53860]-[Info ]-Producer : 103 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53867]-[Info ]-PrintStr : 103 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53860]-[Info ]-Producer : 104 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53867]-[Info ]-PrintStr : 104 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53860]-[Info ]-Producer : 105 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53872]-[Info ]-PrintStr : 105 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53860]-[Info ]-Producer : 106 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53869]-[Info ]-PrintStr : 106 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53860]-[Info ]-Producer : 107 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53865]-[Info ]-PrintStr : 107 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53860]-[Info ]-Producer : 108 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53865]-[Info ]-PrintStr : 108 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53860]-[Info ]-Producer : 109 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53870]-[Info ]-PrintStr : 109 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53860]-[Info ]-Producer : 110 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53870]-[Info ]-PrintStr : 110 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53860]-[Info ]-Producer : 111 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53870]-[Info ]-PrintStr : 111 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53860]-[Info ]-Producer : 112 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53870]-[Info ]-PrintStr : 112 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53860]-[Info ]-Producer : 113 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53867]-[Info ]-PrintStr : 113 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53860]-[Info ]-Producer : 114 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53864]-[Info ]-PrintStr : 114 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53860]-[Info ]-Producer : 115 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53864]-[Info ]-PrintStr : 115 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53860]-[Info ]-Producer : 116 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53870]-[Info ]-PrintStr : 116 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53860]-[Info ]-Producer : 117 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53864]-[Info ]-PrintStr : 117 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53860]-[Info ]-Producer : 118 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53867]-[Info ]-PrintStr : 118 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53860]-[Info ]-Producer : 119 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53871]-[Info ]-PrintStr : 119 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53862]-[Info ]-Producer : 120 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53864]-[Info ]-PrintStr : 120 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53862]-[Info ]-Producer : 121 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53869]-[Info ]-PrintStr : 121 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53862]-[Info ]-Producer : 122 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53872]-[Info ]-PrintStr : 122 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53862]-[Info ]-Producer : 123 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53872]-[Info ]-PrintStr : 123 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53862]-[Info ]-Producer : 124 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53867]-[Info ]-PrintStr : 124 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53862]-[Info ]-Producer : 125 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53869]-[Info ]-PrintStr : 125 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53862]-[Info ]-Producer : 126 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53868]-[Info ]-PrintStr : 126 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53862]-[Info ]-Producer : 127 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53869]-[Info ]-PrintStr : 127 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53862]-[Info ]-Producer : 128 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53865]-[Info ]-PrintStr : 128 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53862]-[Info ]-Producer : 129 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53864]-[Info ]-PrintStr : 129 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53862]-[Info ]-Producer : 130 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53868]-[Info ]-PrintStr : 130 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53862]-[Info ]-Producer : 131 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53871]-[Info ]-PrintStr : 131 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53862]-[Info ]-Producer : 132 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53868]-[Info ]-PrintStr : 132 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53862]-[Info ]-Producer : 133 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53871]-[Info ]-PrintStr : 133 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53862]-[Info ]-Producer : 134 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53873]-[Info ]-PrintStr : 134 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53862]-[Info ]-Producer : 135 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53865]-[Info ]-PrintStr : 135 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53862]-[Info ]-Producer : 136 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53869]-[Info ]-PrintStr : 136 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53862]-[Info ]-Producer : 137 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53866]-[Info ]-PrintStr : 137 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53862]-[Info ]-Producer : 138 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53871]-[Info ]-PrintStr : 138 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53862]-[Info ]-Producer : 139 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53871]-[Info ]-PrintStr : 139 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53863]-[Info ]-Producer : 140 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53872]-[Info ]-PrintStr : 140 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53863]-[Info ]-Producer : 141 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53871]-[Info ]-PrintStr : 141 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53863]-[Info ]-Producer : 142 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53871]-[Info ]-PrintStr : 142 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53863]-[Info ]-Producer : 143 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53869]-[Info ]-PrintStr : 143 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53863]-[Info ]-Producer : 144 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53865]-[Info ]-PrintStr : 144 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53863]-[Info ]-Producer : 145 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53869]-[Info ]-PrintStr : 145 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53863]-[Info ]-Producer : 146 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53864]-[Info ]-PrintStr : 146 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53863]-[Info ]-Producer : 147 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53870]-[Info ]-PrintStr : 147 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53863]-[Info ]-Producer : 148 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53872]-[Info ]-PrintStr : 148 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53863]-[Info ]-Producer : 149 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53869]-[Info ]-PrintStr : 149 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53863]-[Info ]-Producer : 150 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53869]-[Info ]-PrintStr : 150 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53863]-[Info ]-Producer : 151 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53869]-[Info ]-PrintStr : 151 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53863]-[Info ]-Producer : 152 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53864]-[Info ]-PrintStr : 152 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53863]-[Info ]-Producer : 153 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53867]-[Info ]-PrintStr : 153 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53863]-[Info ]-Producer : 154 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53868]-[Info ]-PrintStr : 154 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53863]-[Info ]-Producer : 155 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53869]-[Info ]-PrintStr : 155 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53863]-[Info ]-Producer : 156 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53864]-[Info ]-PrintStr : 156 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53863]-[Info ]-Producer : 157 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53868]-[Info ]-PrintStr : 157 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53863]-[Info ]-Producer : 158 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53873]-[Info ]-PrintStr : 158 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53863]-[Info ]-Producer : 159 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53866]-[Info ]-PrintStr : 159 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53857]-[Info ]-Producer : 160 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53873]-[Info ]-PrintStr : 160 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53857]-[Info ]-Producer : 161 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53870]-[Info ]-PrintStr : 161 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53857]-[Info ]-Producer : 162 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53873]-[Info ]-PrintStr : 162 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53857]-[Info ]-Producer : 163 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53873]-[Info ]-PrintStr : 163 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53857]-[Info ]-Producer : 164 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53873]-[Info ]-PrintStr : 164 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53857]-[Info ]-Producer : 165 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53870]-[Info ]-PrintStr : 165 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53857]-[Info ]-Producer : 166 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53873]-[Info ]-PrintStr : 166 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53857]-[Info ]-Producer : 167 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53868]-[Info ]-PrintStr : 167 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53857]-[Info ]-Producer : 168 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53869]-[Info ]-PrintStr : 168 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53857]-[Info ]-Producer : 169 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53868]-[Info ]-PrintStr : 169 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53857]-[Info ]-Producer : 170 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53872]-[Info ]-PrintStr : 170 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53857]-[Info ]-Producer : 171 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53872]-[Info ]-PrintStr : 171 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53857]-[Info ]-Producer : 172 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53869]-[Info ]-PrintStr : 172 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53857]-[Info ]-Producer : 173 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53866]-[Info ]-PrintStr : 173 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53857]-[Info ]-Producer : 174 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53869]-[Info ]-PrintStr : 174 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53857]-[Info ]-Producer : 175 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53867]-[Info ]-PrintStr : 175 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53857]-[Info ]-Producer : 176 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53869]-[Info ]-PrintStr : 176 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53857]-[Info ]-Producer : 177 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53872]-[Info ]-PrintStr : 177 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53857]-[Info ]-Producer : 178 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53869]-[Info ]-PrintStr : 178 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53857]-[Info ]-Producer : 179 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53870]-[Info ]-PrintStr : 179 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53861]-[Info ]-Producer : 180 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53867]-[Info ]-PrintStr : 180 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53861]-[Info ]-Producer : 181 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53871]-[Info ]-PrintStr : 181 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53861]-[Info ]-Producer : 182 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53867]-[Info ]-PrintStr : 182 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53861]-[Info ]-Producer : 183 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53872]-[Info ]-PrintStr : 183 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53861]-[Info ]-Producer : 184 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53872]-[Info ]-PrintStr : 184 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53861]-[Info ]-Producer : 185 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53869]-[Info ]-PrintStr : 185 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53861]-[Info ]-Producer : 186 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53872]-[Info ]-PrintStr : 186 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53861]-[Info ]-Producer : 187 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53865]-[Info ]-PrintStr : 187 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53861]-[Info ]-Producer : 188 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53868]-[Info ]-PrintStr : 188 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53861]-[Info ]-Producer : 189 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53867]-[Info ]-PrintStr : 189 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53861]-[Info ]-Producer : 190 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53868]-[Info ]-PrintStr : 190 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53861]-[Info ]-Producer : 191 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53870]-[Info ]-PrintStr : 191 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53861]-[Info ]-Producer : 192 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53869]-[Info ]-PrintStr : 192 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53861]-[Info ]-Producer : 193 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53869]-[Info ]-PrintStr : 193 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53861]-[Info ]-Producer : 194 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53870]-[Info ]-PrintStr : 194 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53861]-[Info ]-Producer : 195 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53871]-[Info ]-PrintStr : 195 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53861]-[Info ]-Producer : 196 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53865]-[Info ]-PrintStr : 196 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53861]-[Info ]-Producer : 197 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53868]-[Info ]-PrintStr : 197 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53861]-[Info ]-Producer : 198 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53864]-[Info ]-PrintStr : 198 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53861]-[Info ]-Producer : 199 I am a happy little angel. .
2024-04-08 14:54:22-P[53852]-T[53866]-[Info ]-PrintStr : 199 I am a happy little angel. .
六、性能比对
测试两百万数据,正确性上面验证过了这边就不展示了。
1、int类型
(1)队列
bash
[gbase@czg2 SqQueue]$ perf stat -e page-faults ./TestThreadQ
Performance counter stats for './TestThreadQ':
239 page-faults:u
0.937809171 seconds time elapsed
0.848014000 seconds user
1.011984000 seconds sys
[gbase@czg2 SqQueue]$ perf stat -e page-faults ./TestThreadQ
Performance counter stats for './TestThreadQ':
240 page-faults:u
0.965516773 seconds time elapsed
0.802651000 seconds user
1.104909000 seconds sys
[gbase@czg2 SqQueue]$ perf stat -e page-faults ./TestThreadQ
Performance counter stats for './TestThreadQ':
243 page-faults:u
0.955249443 seconds time elapsed
0.795319000 seconds user
1.098636000 seconds sys
(2)线程池
bash
[gbase@czg2 MyPool]$ perf stat -e page-faults ./TestThreadPool
2024-04-08 10:40:26-P[48564]-T[48580]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 10:40:26-P[48564]-T[48581]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 10:40:26-P[48564]-T[48575]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 10:40:26-P[48564]-T[48578]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 10:40:26-P[48564]-T[48583]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 10:40:26-P[48564]-T[48584]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 10:40:26-P[48564]-T[48576]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 10:40:26-P[48564]-T[48582]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 10:40:26-P[48564]-T[48579]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 10:40:26-P[48564]-T[48577]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
Performance counter stats for './TestThreadPool':
330 page-faults:u
1.121115817 seconds time elapsed
1.252635000 seconds user
0.938719000 seconds sys
[gbase@czg2 MyPool]$ perf stat -e page-faults ./TestThreadPool
2024-04-08 10:40:41-P[48714]-T[48716]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 10:40:42-P[48714]-T[48729]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 10:40:42-P[48714]-T[48731]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 10:40:42-P[48714]-T[48727]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 10:40:42-P[48714]-T[48734]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 10:40:42-P[48714]-T[48733]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 10:40:42-P[48714]-T[48728]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 10:40:42-P[48714]-T[48726]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 10:40:42-P[48714]-T[48730]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 10:40:42-P[48714]-T[48725]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 10:40:42-P[48714]-T[48732]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
Performance counter stats for './TestThreadPool':
330 page-faults:u
1.105540928 seconds time elapsed
1.180810000 seconds user
0.954159000 seconds sys
[gbase@czg2 MyPool]$ perf stat -e page-faults ./TestThreadPool
2024-04-08 10:40:44-P[48767]-T[48779]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 10:40:44-P[48767]-T[48787]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 10:40:44-P[48767]-T[48781]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 10:40:44-P[48767]-T[48786]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 10:40:44-P[48767]-T[48783]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 10:40:44-P[48767]-T[48785]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 10:40:44-P[48767]-T[48784]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 10:40:44-P[48767]-T[48778]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 10:40:44-P[48767]-T[48782]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
Performance counter stats for './TestThreadPool':
326 page-faults:u
1.086408058 seconds time elapsed
1.263473000 seconds user
0.862466000 seconds sys
(3)总结
int类型数据,队列相较于线程池快100毫秒左右。
2、char[]类型
测试两百万数据,正确性上面验证过了这边就不展示了,字符串加长到了182字节。
(1)队列
bash
[gbase@czg2 SqQueue]$ perf stat -e page-faults ./TestThreadQ
Performance counter stats for './TestThreadQ':
295 page-faults:u
2.788114327 seconds time elapsed
1.812386000 seconds user
3.664842000 seconds sys
[gbase@czg2 SqQueue]$ perf stat -e page-faults ./TestThreadQ
Performance counter stats for './TestThreadQ':
284 page-faults:u
2.945201020 seconds time elapsed
1.637381000 seconds user
4.164555000 seconds sys
[gbase@czg2 SqQueue]$ perf stat -e page-faults ./TestThreadQ
Performance counter stats for './TestThreadQ':
275 page-faults:u
2.908095580 seconds time elapsed
1.893301000 seconds user
3.811112000 seconds sys
(2)线程池
bash
[gbase@czg2 MyPool]$ perf stat -e page-faults ./TestThreadPool
2024-04-08 15:03:00-P[54367]-T[54381]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 15:03:00-P[54367]-T[54378]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 15:03:00-P[54367]-T[54382]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 15:03:00-P[54367]-T[54383]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 15:03:00-P[54367]-T[54385]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 15:03:00-P[54367]-T[54387]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 15:03:00-P[54367]-T[54379]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 15:03:00-P[54367]-T[54380]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 15:03:00-P[54367]-T[54384]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 15:03:00-P[54367]-T[54386]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
Performance counter stats for './TestThreadPool':
349 page-faults:u
1.197422931 seconds time elapsed
1.396612000 seconds user
0.937120000 seconds sys
[gbase@czg2 MyPool]$ perf stat -e page-faults ./TestThreadPool
2024-04-08 15:03:02-P[54406]-T[54420]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 15:03:02-P[54406]-T[54424]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 15:03:02-P[54406]-T[54419]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 15:03:02-P[54406]-T[54418]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 15:03:02-P[54406]-T[54422]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 15:03:02-P[54406]-T[54423]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 15:03:02-P[54406]-T[54425]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 15:03:02-P[54406]-T[54426]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 15:03:02-P[54406]-T[54421]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 15:03:02-P[54406]-T[54417]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
Performance counter stats for './TestThreadPool':
385 page-faults:u
1.094630281 seconds time elapsed
1.402972000 seconds user
0.768006000 seconds sys
[gbase@czg2 MyPool]$ perf stat -e page-faults ./TestThreadPool
2024-04-08 15:03:05-P[54436]-T[54450]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 15:03:05-P[54436]-T[54448]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 15:03:05-P[54436]-T[54452]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 15:03:05-P[54436]-T[54454]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 15:03:05-P[54436]-T[54455]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 15:03:05-P[54436]-T[54456]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 15:03:05-P[54436]-T[54453]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 15:03:05-P[54436]-T[54447]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 15:03:05-P[54436]-T[54449]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
2024-04-08 15:03:05-P[54436]-T[54451]-[Warn ]-ThrdCondTimedWait : Normal, Time Out.
Performance counter stats for './TestThreadPool':
373 page-faults:u
1.133650984 seconds time elapsed
1.462385000 seconds user
0.747731000 seconds sys
(3)总结
char[]类型数据,字符串长度在182字节,队列相较于线程池慢1.8秒左右。如果把数据长度和并发数据加大,这个差距更大,说明拷贝指针的方法效率更高。