如何同时运行两个MethoD [英] How to Run two MethoD Simultanelously

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

问题描述





i有两种方法可以生成一个pthon文件和另一种方法来读取该文件

但是我需要做两个瘦同时..

如何做到这一点。

hi

i have two method one method to genrated a pthon file and other method to read that File
but i need to do both the Thin simultaneously..
How to do that.

推荐答案

您的问题并不完全清楚所以我希望以下解决方案涵盖你的问题。



首先 - 我不相信阅读文件是一个好主意 - 如果读者比作家跑得快,如果文件被锁定等等 - 你需要考虑的事情。



关于做事情同时看看这篇文章异步方法调用 [ ^ ]



然后在其他可以找到的地方在哪里 [ ^ ]



如果您尝试了某些问题并遇到问题,请使用您编写的代码返回并发布有关该问题的问题
Your question isn't entirely clear so I hope the following solution covers your problem.

Firstly - I'm not convinced that reading a file as it is being written is such a good idea - what if the reader runs faster than the writer, what if the file is locked, etc - things you need to consider.

As to doing "things simultaneously" have a look at this article Asynchronous Method Invocation[^]

And then at the others that can be found here[^]

If you then try something and hit a problem, come back and post a question about that problem, with the code that you have written


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

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