Boost logo

Boost :

Subject: [boost] New Version (0.4) of Boost.Application (Aspect Based) available to comments (RFC).
From: Renato Forti (re.tf_at_[hidden])
Date: 2013-11-09 09:43:59


>> How is that supposed to work in Windows? (Does it need to?)

Well, a simple analysis, it seems to be specific in POSIX, we do not have
anything like it in WINDOWS. (I do not speak for sure)

>> Its sensible to expose 'something' that can be integrated to native event
loops, but the ideal choice under Windows is probably an event, not a pipe
descriptor.

I agree. I'm thinking of adding this aspect only in posix, Then if user want
use it need add it and use it only on UNIX, e.g.:

class myapp
{
public:

   int operator()(application::context& context)
   {

#if defined(BOOST_ BOOST_POSIX_API)
      boost::shared_ptr<application:: selfpipe > selfpipe
         = context.get_aspect<application:: selfpipe >();

     select(...,selfpipe->readfd(),...);
#endif

      return 0;
   }
};

// main

int main(int argc, char *argv[])
{
   myapp app;

   application::context app_context;

#if defined(BOOST_ BOOST_POSIX_API)
   app_context.add_aspect<application:: selfpipe>(
      boost::make_shared<application:: selfpipe>());
#endif

   return application::launch<application::common>(app, app_context);
}

Comments, Ideas, please!

>> I think some analysis is needed.

I need help in this subject, if any one with great experience on both sides
can propose something (shine a light), it would be of great value!

Thanks for help


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk