online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
from multiprocessing import Queue, Process from threading import Thread from time import sleep urls_queue = Queue() max_process = 4 def read_urls(): with open('urls_file.txt', 'r') as f: for url in f: urls_queue.put(url.strip()) print('put url: {}'.format(url.strip())) # put DONE to tell send_request_processor to exit for i in range(max_process): urls_queue.put("DONE") def send_request(url): print('send request: {}'.format(url)) sleep(1) print('recv response: {}'.format(url)) def send_request_processor(): print('start send request processor') while True: url = urls_queue.get() if url == "DONE": break else: send_request(url) def main(): file_reader_thread = Thread(target=read_urls) file_reader_thread.start() procs = [] for i in range(max_process): p = Process(target=send_request_processor) procs.append(p) p.start() for p in procs: p.join() print('all done') # wait for all tasks in the queue file_reader_thread.join() if __name__ == '__main__': main()
line 1 line 2 line 3 line 4

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue