Tag: 循环列表

圆形链表在c窗口中无法正常工作

我试图通过服务器端应用程序实现循环链​​表来管理一组任务。 应用程序是multithreading的,其中一个线程( updater() )仅读取链接列表以进行读取,而另外两个( push_stream() and delete_stream() )访问链接列表以分别添加和删除链接列表。 我的问题不是删除所有要删除的文件(处理后)。 struct data_stream { bool processed; int count; char filename[30]; int TYPE_GRP; int task_type; struct data_stream *next; }; struct data_stream *stream_head=NULL; //global variable 主要(部分代码) main() { _beginthread(updater, 0, NULL); while ((new_socket = accept(srv_sock, (struct sockaddr *)&client, &c)) != INVALID_SOCKET) { _beginthreadex(0, 0, handle_client, &new_socket, 0, 0); } […]