运行功能 [英] running functions

查看:87
本文介绍了运行功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好

我不知道该怎么说这个问题。我有一个Python函数

,它将MIDI消息发送给合成器。当我运行它时,我当然有

要等到它完成之后才能用

Python做任何其他事情。有没有可能运行这个功能,并且在运行时仍然可以使用Python做其他事情?是什么线程

是关于什么?

Hello
I''m not sure how to phrase this question. I have a Python function
that sends MIDI messages to a synth. When I run it, I of course have
to wait until it is finished before I can do anything else with
Python. Is it possible to run this function and still be able to do
other things with Python while it is running? Is that what threading
is about?

推荐答案

2005-11-16,Gorlon the Impossible< me * *******@yahoo.com>写道:
On 2005-11-16, Gorlon the Impossible <me********@yahoo.com> wrote:
我不知道该怎么说这个问题。我有一个Python函数
将MIDI消息发送到合成器。当我运行它时,我当然要等到它完成之后才能用Python做任何其他事情。是否可以运行此功能,并且在运行时仍然可以使用Python执行其他操作?


是的。

这是什么线程?
I''m not sure how to phrase this question. I have a Python function
that sends MIDI messages to a synth. When I run it, I of course have
to wait until it is finished before I can do anything else with
Python. Is it possible to run this function and still be able to do
other things with Python while it is running?
Yes.
Is that what threading is about?




确切地说。看看踩踏模块:

http: //www.python.org/doc/current/li...threading.html


-

Grant Edwards grante哇! BRILL CREAM在CREAM O''WHEAT另一个是


visi.com DIMENSION ......



Exactly. Take a look at the "treading" module:

http://www.python.org/doc/current/li...threading.html

--
Grant Edwards grante Yow! BRILL CREAM is
at CREAM O'' WHEAT in another
visi.com DIMENSION...


On 2005-11-16,Gorlon the Impossible< me ******** @ yahoo.com>写道:
On 2005-11-16, Gorlon the Impossible <me********@yahoo.com> wrote:
我不知道该怎么说这个问题。我有一个Python函数
将MIDI消息发送到合成器。当我运行它时,我当然要等到它完成之后才能用Python做任何其他事情。是否可以运行此功能,并且在运行时仍然可以使用Python执行其他操作?


是的。

这是什么线程?
I''m not sure how to phrase this question. I have a Python function
that sends MIDI messages to a synth. When I run it, I of course have
to wait until it is finished before I can do anything else with
Python. Is it possible to run this function and still be able to do
other things with Python while it is running?
Yes.
Is that what threading is about?




确切地说。看看踩踏模块:

http: //www.python.org/doc/current/li...threading.html


-

Grant Edwards grante哇! BRILL CREAM在CREAM O''WHEAT另一个是


visi.com DIMENSION ......



Exactly. Take a look at the "treading" module:

http://www.python.org/doc/current/li...threading.html

--
Grant Edwards grante Yow! BRILL CREAM is
at CREAM O'' WHEAT in another
visi.com DIMENSION...


Gorlon不可能的< me ******** @ yahoo.com>写道:
Gorlon the Impossible <me********@yahoo.com> wrote:
我不知道怎么说这个问题。我有一个Python函数
将MIDI消息发送到合成器。当我运行它时,我当然要等到它完成之后才能用Python做任何其他事情。是否可以运行此功能,并且在运行时仍然可以使用Python执行其他操作?那是什么穿线
是什么?
I''m not sure how to phrase this question. I have a Python function
that sends MIDI messages to a synth. When I run it, I of course have
to wait until it is finished before I can do anything else with
Python. Is it possible to run this function and still be able to do
other things with Python while it is running? Is that what threading
is about?




线程是一个复杂的答案。子流程是一个不那么复杂的答案。


(好的sigmonster,有饼干)


-

\\ \\我还没有看到任何问题,无论多么复杂,当你以正确的方式看着它时,它都没有变得那么复杂|

_o__)更复杂。 - 保罗安德森|

Ben Finney



Threads are a complex answer. Subprocesses are a less complex answer.

(good sigmonster, have a biscuit)

--
\ "I have yet to see any problem, however complicated, which, |
`\ when you looked at it in the right way, did not become still |
_o__) more complicated." -- Paul Anderson |
Ben Finney


这篇关于运行功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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