[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Does pygame execute on a separate process/thread?



On Thu, Apr 6, 2017 at 7:57 AM, Deven Hickingbotham <devenh@xxxxxxxxxxx> wrote:
When playing an audio file (pygame.mixer.music.play()) I have always assumed that this executed in a process or thread separate from the main thread since the call to play was non blocking.
​AFAIK, pygame is singlethreaded. For sound at least, the syscall that starts the audio device is asynchronous (i.e., the CPU doesn't babysit the sound card for every byte it plays; this wouldn't perform acceptably).