Hello Benoît, well, I tried your "trick" on using file descriptors.
It seems it's OK ! But I verify a problem: when the midi-program runs, and midi events aren't sent, the use of one CPU springs up to 100% !!! If I press on a button or other object on the Form, the use of that CPU decreases to lower values. It is not important if these buttons activate some functions or commands: if I want decrease that 100% value of CPU, it enough I press a button for more times. regards Paolo --- Dom 18/9/11, Benoît Minisini <gam...@users.sourceforge.net> ha scritto: > Da: Benoît Minisini <gam...@users.sourceforge.net> > Oggetto: Re: [Gambas-user] Release of Gambas 3 RC3. But I have a dream.... BIS > A: "mailing list for gambas users" <gambas-user@lists.sourceforge.net> > Data: Domenica 18 settembre 2011, 23:24 > > Hello, > > > > about your new suggestion: > > > > 1) like I said, now I can open the fd in: > /proc/self/fd/ > > > > e.g.: hFile = Open "/proc/self/fd/20" For read watch > > > > some fd (like 3,4,5,6, 16 and 20) gives data, others > not. > > > > So, I don't understand what's the use of the trick. > > > > 2) how have I to use it ? maybe: > > > > hFile = Open "/proc/self/fd/.1" For read watch > > > > 3) I use Gambas 3, where can I download the revision > #4134 ? > > > > Thanks > > Paolo > > > > > > P.S.: Benoît ! Is not it better if you add that > possibility to personalize > > the message loop ??? > > > > Forget the "/proc/self/fd" thing. The new solution is the > best I found without > breaking compatibility. Maybe there will be another > solution after Gambas 3. > > I suggest you read the "subversion howto" on gambasdoc.org > to learn how to use > subversion to get the latest development release. > > You ask how to use it. Did you read my mail? there is an > example in it. For > watching the file, just add the WATCH keyword. So: > > Dim iAlsaFileDescriptor As Integer > Dim hFile As File > > hFile = Open "." & > CStr(iAlsaFileDescriptor) For Read Watch > > ... > > Sub File_Read() > ' Get the data > received through hFile > End > > To stop the watching, just close "hFile". The original ALSA > file descriptor > will not be closed. > > Regards, > > -- > Benoît Minisini > > ------------------------------------------------------------------------------ > BlackBerry® DevCon Americas, Oct. 18-20, San > Francisco, CA > http://p.sf.net/sfu/rim-devcon-copy2 > _______________________________________________ > Gambas-user mailing list > Gambas-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > ------------------------------------------------------------------------------ All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2dcopy2 _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user