ipc

Lowest latency notification method between process under Linux

百般思念 提交于 2019-12-18 12:20:53
问题 I'm looking for the lowest latency IPC that allow to put one process to sleep and allow other process to wake it. I'm looking for the lowest latency method. Some possible methods so far: Writing a byte to a pipe and reading it from it. Writing a byte to a socket and reading it from it. Sending a signal (kill) and waiting for it (sigwait) Using sem_post/sem_wait Any other better ideas? Any solution that is Linux specific is fine as well. 回答1: Generally... There is almost no difference between

How do I share a Core Data store between processes using NSDistributedNotifications?

旧街凉风 提交于 2019-12-18 12:03:42
问题 Background I've already posted a question about the basics of sharing a Core Data store between processes. I'm trying to implement the recommendations given and I'm running into problems. My Goal I have two processes - the Helper App and the UI. They both share a single data store. I want the UI to update it's NSManagedObjectContext when the Helper App has saved new data to the store. Current Program Flow The Helper App Process writes data to the Store. In the Helper App, I listen for

System V shared memory in Python?

无人久伴 提交于 2019-12-18 11:54:06
问题 How can I make use of the shmat() , shmdt() , shmctl() , shmget() calls from Python? Are they hidden somewhere in the standard library? Update0 I'm after System V bindings that can be found in the Ubuntu repositories, or Python standard libraries (now or in future releases). 回答1: Google finds sysv_ipc. 回答2: If you don't want to use any non-standard Python libraries, perhaps you could wrap the functions you need yourself using ctypes? 回答3: This page offers a feature matrix to help you choose

Sockets vs named pipes for local IPC on Windows?

一曲冷凌霜 提交于 2019-12-18 11:50:52
问题 Are there any reasons for favoring named pipes over sockets for local IPC (both using win-api), effectiveness-wize, resource-wize or otherwise, since both behave very much alike (and likely to be abstracted by a similiar interface anyway), in an application that is likely to already use sockets for network purposes anyway? I can name at least the addressing issue: port numbers for sockets against filenames for pipes. Also, named pipes (AFAIK) won't alert the firewall (block/unblock dialog),

Inter-Process Communication Recommendation [closed]

自闭症网瘾萝莉.ら 提交于 2019-12-18 11:18:26
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . I'm searching for a light-weight, fast and easy way to handle Inter Process Communication between some programs on a Linux machine. Currently, I'm thinking Named Pipe, because it's provided by the OS itself. Are there any caveats about the performance or usability? Would Shared Memory be better? I don't think I

Inter-Process Communication Recommendation [closed]

别说谁变了你拦得住时间么 提交于 2019-12-18 11:18:19
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . I'm searching for a light-weight, fast and easy way to handle Inter Process Communication between some programs on a Linux machine. Currently, I'm thinking Named Pipe, because it's provided by the OS itself. Are there any caveats about the performance or usability? Would Shared Memory be better? I don't think I

How do you stream data into the STDIN of a program from different local/remote processes in Python?

杀马特。学长 韩版系。学妹 提交于 2019-12-18 09:37:11
问题 Standard streams are associated with a program. So, suppose there is a program already running in some way (I don't care how or in what way). The goal is to create pipes to the STDIN of the program from different processes (or programs) that run either locally or remotely and stream data into it asynchronously. Available information is (1) the host address and (2) the pid of the program only. How does one implement both cases in Python in this case? Edit: I should have mentioned this

Java Interprocess Communication

谁都会走 提交于 2019-12-18 05:14:16
问题 I have a situation where i need to send commands to a running java application, now i am using tcp/ip socket to send commands to the application using a internet explorer context menu item. But as soon as the application starts virus scanners complain that the application started listening, although i am only listening for local connections. I think this may be confusing to the users. I am looking at others ways of communicating without pissing off av scanners? 回答1: For this, you're best off

Read all contents of memory mapped file or Memory Mapped View Accessor without knowing the size of it

只愿长相守 提交于 2019-12-18 04:52:32
问题 I need something similar to ReadToEnd or ReadAllBytes to read all of the contents of the MemoryMappedFile using the MappedViewAccessor if I don't know the size of it, how can I do it? I have searched for it, I have seen this question, but it is not the thing I am looking for: How can I quickly read bytes from a memory mapped file in .NET? Edit: There is a problem, the (int)stream.Length is not giving me the correct length, it rather gives the size of the internal buffer used! I need to

Java and C++ Shared Memory

情到浓时终转凉″ 提交于 2019-12-18 04:44:40
问题 I have a C++ piece of code that creates shared memory. Is it possible to write Java Code which can read the memory created by the C++ code unless using JNI. By the way I am using Windows OS. 回答1: See MappedByteBuffer. It's the standard Java class to read & write shared memory. I use it a lot. Yes, you can use this to communicate with any program written in any language which uses shared memory, and it's all very standard Java, no JNI. 回答2: Yes, you can use code project :code project 来源: https