import torch


def _process(queue):
    input_ = queue.get()
    print('get')
    queue.put(input_)
    print('put')


if __name__ == '__main__':
    torch.multiprocessing.set_start_method('spawn')
    input_ = torch.ones(1).cuda()
    queue = torch.multiprocessing.Queue()
    queue.put(input_)
    process = torch.multiprocessing.Process(target=_process, args=(queue,))
    process.start()
    process.join()
    result = queue.get()
    print('end')
    print(result)

I executed this code, and only get and put printed, no end. I use ctrl-c to interrupt it, I find it blocks in result = queue.get(). Any idea?