| 124 | ////////////////////////////////////////////////////////////////////////// |
| 125 | |
| 126 | int main(int argc, char* argv[]) |
| 127 | { |
| 128 | int max = 10; |
| 129 | if (argc >= 2) |
| 130 | { |
| 131 | max = atoi(argv[1]); |
| 132 | if (max <= 0) |
| 133 | max = 10; |
| 134 | } |
| 135 | |
| 136 | // ��ʼ�� acl �� |
| 137 | acl::acl_cpp_init(); |
| 138 | |
| 139 | acl::thread_queue queue; |
| 140 | |
| 141 | producer producer(queue, max); |
| 142 | producer.set_detachable(false); |
| 143 | producer.start(); |
| 144 | |
| 145 | consumer consumer(queue); |
| 146 | consumer.set_detachable(false); |
| 147 | consumer.start(); |
| 148 | |
| 149 | producer.wait(); |
| 150 | consumer.wait(); |
| 151 | |
| 152 | printf("enter any key to exit ...\r\n"); |
| 153 | getchar(); |
| 154 | |
| 155 | return 0; |
| 156 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…