Skip to content

Instantly share code, notes, and snippets.

View methodmissing's full-sized avatar

Lourens Naudé methodmissing

View GitHub Profile
methodmissing@www:~/installs/eventmachine$ ls
docs eventmachine.gemspec examples ext java lib Rakefile README setup.rb tasks tests web
methodmissing@www:~/installs/eventmachine$ gem build eventmachine.gemspec
ERROR: While executing gem ... (Gem::InvalidSpecificationException)
["java/src/com/rubyeventmachine/Application.java", "java/src/com/rubyeventmachine/Connection.java", "java/src/com/rubyeventmachine/ConnectionFactory.java", "java/src/com/rubyeventmachine/DefaultConnectionFactory.java", "java/src/com/rubyeventmachine/PeriodicTimer.java", "java/src/com/rubyeventmachine/Timer.java", "tasks/project.rake"] are not files
methodmissing@www:~/installs/eventmachine$ sudo nano eventmachine.gemspec
methodmissing@www:~/installs/eventmachine$ gem build eventmachine.gemspec
ERROR: While executing gem ... (Gem::InvalidSpecificationException)
["tasks/project.rake"] are not files
// ############################### start add member ###############################
if ($_POST['do'] == 'addmember')
{
$vbulletin->input->clean_array_gpc('p', array(
'options' => TYPE_ARRAY_BOOL,
'username' => TYPE_STR,
'email' => TYPE_STR,
'emailconfirm' => TYPE_STR,
'parentemail' => TYPE_STR,
// ############################### start add member ###############################
if ($_POST['do'] == 'addmember')
{
$vbulletin->input->clean_array_gpc('p', array(
'options' => TYPE_ARRAY_BOOL,
'username' => TYPE_STR,
'email' => TYPE_STR,
'emailconfirm' => TYPE_STR,
'parentemail' => TYPE_STR,
// ############################### start add member ###############################
if ($_POST['do'] == 'addmember')
{
$vbulletin->input->clean_array_gpc('p', array(
'options' => TYPE_ARRAY_BOOL,
'username' => TYPE_STR,
'email' => TYPE_STR,
'emailconfirm' => TYPE_STR,
'parentemail' => TYPE_STR,
require 'eventmachine'
require 'em-http'
require 'benchmark'
HANDLES = %w(methodmissing tpinto goplan barcamppt barcamppt12 barcamppt13)
EM.run do
HANDLES.each do |handle|
http = EventMachine::HttpRequest.new("http://twitter.com/#{handle}").get :timeout => 10
aio.c: In function ‘inspect_aiocb’:
aio.c:81: warning: format ‘%s’ expects type ‘char *’, but argument 4 has type ‘volatile void *’
aio.c:81: warning: format ‘%d’ expects type ‘int’, but argument 5 has type ‘long unsigned int’
aio.c:81: warning: format ‘%d’ expects type ‘int’, but argument 6 has type ‘size_t’
aio.c:81: warning: format ‘%d’ expects type ‘int’, but argument 7 has type ‘off_t’
aio.c: In function ‘control_block_open’:
aio.c:162: warning: ISO C90 forbids mixed declarations and code
aio.c: In function ‘rb_aio_s_lio_listio’:
aio.c:668: warning: passing argument 3 of ‘rb_ensure’ from incompatible pointer type
aio.c:670: warning: passing argument 3 of ‘rb_ensure’ from incompatible pointer type
Loaded suite /opt/local/ruby19/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake/rake_test_loader
Started
si_signo 23
si_errno 0
si_code 0
si_pid 0
si_uid 0
si_status 23
si_value.sival_int 0
static VALUE
control_block_close(VALUE cb)
{
rb_aiocb_t *cbs = GetCBStruct(cb);
if NIL_P(cbs->io) return Qfalse;
/* Free q'd requests on Darwin */
aio_return(&cbs->cb);
rb_io_close(cbs->io);
cbs->io = Qnil;
cbs->rcb = Qnil;
/*
* Helper to ensure files opened via AIO.lio_listio is closed.
*/
static void
rb_io_closes( VALUE cbs ){
int io;
for (io=0; io < RARRAY_LEN(cbs); io++) {
control_block_close( RARRAY_PTR(cbs)[io] );
}
}
/*
* lio_listio - initiate a list of IO requests. We process the list of aiocbs
* either synchronously (mode == LIO_WAIT) or asynchronously (mode == LIO_NOWAIT).
* The caller gets error and return status for each aiocb in the list via aio_error
* and aio_return. We must keep completed requests until released by the
* aio_return call.
*/