MCPcopy Create free account
hub / github.com/acl-dev/acl / main

Function main

lib_acl_cpp/samples/thread_queue/main.cpp:126–156  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

124//////////////////////////////////////////////////////////////////////////
125
126int 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}

Callers

nothing calls this directly

Calls 3

acl_cpp_initFunction · 0.85
startMethod · 0.45
waitMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…