Find the answer to your Linux question:
Results 1 to 4 of 4
Is it possible to connect a signal handler to a variable? So when the variable changes the signal handler is called. I have a vector containing strings which i want ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2010
    Posts
    3

    glibmm signal


    Is it possible to connect a signal handler to a variable?
    So when the variable changes the signal handler is called.

    I have a vector containing strings which i want to parse when there are one or more available strings in the vector.

    i'm using gtkmm.

    thnx.

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,572
    Not as far as I am aware. There are a number of techniques you can use, depending upon the situation, and what sort of response time you wish to tolerate. I assume this variable is a system-wide volatile variable that other processes, threads, kernel modules may change?
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  3. #3
    Just Joined!
    Join Date
    Nov 2010
    Posts
    3
    yes it is... every thread can read/write it...

  4. #4
    Just Joined!
    Join Date
    Nov 2010
    Posts
    3
    i solved it

    i used this: library.gnome.org/devel/gtkmm-tutorial/2.21/chapter-custom-signals.html.en

    i emitted a signal when there is data available and then a new thread is started with the received data passed to the new thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •