Re: Running the kernel as a daemon?
- To: mathgroup at smc.vnet.net
- Subject: [mg61874] Re: Running the kernel as a daemon?
- From: "Jens-Peer Kuska" <kuska at informatik.uni-leipzig.de>
- Date: Thu, 3 Nov 2005 04:58:44 -0500 (EST)
- Organization: Uni Leipzig
- References: <email@example.com>
- Sender: owner-wri-mathgroup at wolfram.com
Hi, "Steven T. Hatton" <hattons at globalsymmetry.com> schrieb im Newsbeitrag news:dka0fc$70v$1 at smc.vnet.net... | I'm back to trying to figure out how I can interface with Mathematica from | an external program. This may be covered in subsequent sections of the | Mathematica Book, but I want to get this message out before Today's | messages are posted. I'm currently reading /2.13.8 Special Topic: | Communication with Mathematica Front Ends/. | | Can I start a program - say a QApplication - which has its own "event loop", | not use MLMain, establish a connection to a running Mathematica kernel, and | communicate with the kernel asynchronously. Yes just look in the main event loop of your application not only for messages from your GUI, look also for messages from the Mathematica kernel. | What I mean is that I want to | be able to run my program and do other things while the connection is | opened, and waiting for my program to send commands. I'm pretty sure | I /can/ do this, but I'm not sure how easy it will be. Do I need multiple | threads in my program to do this? it depend on the rest of your program, but starting a single thread that talk with the Mathematica kernel is a good idea in a GUI environment. | | Also, I want to the kernel instance to run as a "server" or daemon, in the | same way it does for the front end. Does MathLink make that easy? MathLink make it easy to launch a kernel and to communicate with it, but it is *not* a daemon, it is a direct connection between the two programs. | | Is there a C++ wrapper for MathLink? Where? No in C++, but if you need a C-like object interface .NET/Link will do this. Regards Jens | -- | "Philosophy is written in this grand book, The Universe. ... But the book | cannot be understood unless one first learns to comprehend the language... | in which it is written. It is written in the language of mathematics, ...; | without which wanders about in a dark labyrinth." The Lion of Gaul |