在应用程序中一起使用pyglet,twisted,pygtk [英] Using pyglet, twisted, pygtk together in an application

查看:65
本文介绍了在应用程序中一起使用pyglet,twisted,pygtk的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个应用程序,可以让您在不同的系统上同步播放音乐.对于该项目,我决定使用twisted,PyGtk2,Pyglet.我对应该如何运行主循环感到困惑.我应该在单独的线程中运行pyglet的循环,还是应该实现一个集成了扭曲的pygtk2 pyglet的新反应堆.如果我尝试将三个循环集成在一起,性能会受到影响吗?

I am making an app, that lets you play music synchronously on different systems. For the project, I have decided to use twisted, PyGtk2, Pyglet. I am confused on how should the main loop be run. Should i run pyglet's loop in a separate thread or should i implement a new reactor integrating twisted, pygtk2, pyglet. Will the performance suffer if i try to integrate three loops together?

推荐答案

我使用了 https://github.com/padraigkitterick/pyglet-twisted ,当与pyglet玩耍并扭曲时,它适用于我的玩具盒.无论如何,都是很好的起点.

I used https://github.com/padraigkitterick/pyglet-twisted when playing with pyglet and twisted, and it worked for my toy cases. Good starting point, anyway.

以上是基于ThreadedSelectReactor的新反应堆.

The above is a new reactor based on ThreadedSelectReactor.

我不清楚这三者的构成是什么样的...

It's not clear to me what the composition of all three would look like...

这篇关于在应用程序中一起使用pyglet,twisted,pygtk的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆