UWP Mutex [英] UWP Mutex

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

问题描述

两个UWP程序同时访问快速资源,如何实现程序的互斥?注意:有两个不同的进程,而不是线程。可以使用Mute Mutex实现两个进程的互斥吗?

Two UWP programs access a fast resource at the same time, how to achieve mutual exclusion of the program? Note: There are two different processes, not threads. Can the mutual exclusion of two processes be achieved with the Mute Mutex?

推荐答案

让我们说快速资源是简单的txt文件。一旦一个UWP应用程序使用它并完成某些工作,系统将在您使用其他应用程序访问该文件时发出正在使用该文件的警报。这不需要你做任何事情,因为系统判断为
。我可以知道你为什么这么问吗? 

Let's say the fast resource is simple txt file. Once it is used by one UWP app and doing some work, the system will give an alert that the file is being used when you use another app to access it. This doesn't require you to do anything as it is judged by the system. May I know why you are asking about this? 

致以最好的问候,

Roy


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

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