similar to: Buffer flushing

Displaying 20 results from an estimated 1000 matches similar to: "Buffer flushing"

2008 Mar 18
1
Eventmachine utils
I''m working on StrokeDB* right now and put pieces of networking stuff into a separate repository "Eventmachine utils". There are 3 useful libs already: protocol chaining, messaging protocol and marshalled messaging protocol. Check them out :-) Overview: http://gitorious.org/projects/eventmachine-utils Files:
2008 Jan 06
5
Having very odd problems with UDP.
I am using eventmachine 0.8.1 on windows XP and am having very odd problems. This snippet of code gives the error that follows it. class EchoServer def receive_data data puts data send_data ">>>you sent: #{data}" if data =~ /quit/i puts "quitting" close_connection EventMachine::stop_event_loop end end end
2006 Nov 03
6
How to send data,
Hello, First of all I''m new to working with sockets, so the problems I''m having are probably because of my lack of understanding. What I''m trying to accomplish is to create a mac os x client gui to ruby-debug. When a application that includes ruby-debug is started, it starts listening for 2 connections; 8989, 8990 The connection is made by calling the connectToApp
2008 Oct 23
3
ANN: EMDRb 0.1.0
I am pleased to announce the release of EMDRb version 0.1.0, a rudimentary implementation of a distributed Ruby server based on EventMachine. It''s available on Rubyforge at http://rubyforge.org/projects/emdrb but I must admit that it has thus far only been lightly tested and still a bit feature incomplete. The server implementation can already do all of the basic stuff one expects DRb
2006 Dec 15
5
Testing event driven Socket classes
Ok, here is the class, I want to Unit Test, its part of a large app and is based on EventMachine library. I want to mock the class TickServer ( i.e not stub it) . Since in actual scenario, you can''t do this on this class: @server = TickServer.new # will toss an exception at your face you must initialize the server like this: EventMachine.run {
2007 May 24
4
Multiple EM connections on separate threads
Hi EM Gurus, I''m hoping someone can shed some light on the following... I''m using a 3rd party (legacy) server that can accept up to 8 simultaneous connections on one port. I''ve been able to make multiple connections to this server from within one call to EventMachine::run {...}. Specificaly, I can access each connection separately using: em_thread = Thread.new do
2006 Aug 08
11
Core dump using sample DumbHttpClient
I''m using the current release branch from the repository (version_0) on freebsd 6.1 with ruby 1.8.4. This is the error that is generated when running the code below at the bottom of the message, plus a gdb bt. Sorry no debugging symbols built into ruby but maybe the bt will help anyways. terminate called after throwing an instance of ''std::runtime_error'' what():
2007 Mar 13
2
Sweave question: prevent expansion of unevaluated reused code chunk
Hi, Consider the following (much simplified) Sweave example: -------------- First, we set the value of $x$: <<chunk1,eval=FALSE>>= x <- 1 @ Then we set the value of $y$: <<chunk2,eval=FALSE>>= y <- 2 @ Thus, the overall algorithm has this structure: <<combined,eval=FALSE>>= <<chunk1>> <<chunk2>> @
2008 Feb 01
6
epoll increasing latency big time
Sorry this is going to be a bit vague, but I''ve noticed something rather odd going on with EventMachine on Linux. I''ve written something uses EventMachine to proxy HTTP to other processes. On OS X, it works great, adding only about 20% extra latency into the connection when proxying versus connecting to the original backend process directly, so a 5ms connection might now take
2010 Dec 11
5
(S|odf)weave : how to intersperse (\LaTeX{}|odf) comments in source code ? Delayed R evaluation ?
Dear list, Inspired by the original Knuth tools, and for paedaogical reasons, I wish to produce a document presenting some source code with interspersed comments in the source (see Knuth's books rendering TeX and metafont sources to see what I mean). I seemed to remember that a code chunk could be defined piecewise, like in Comments... <<Chunk1, eval=FALSE, echo=TRUE>>=
2006 May 22
3
core-model-2
I''ve added experiments/core-model-2 to SVN. I think this is pretty clean and satisfactory. Jeff, please have a look and see if you like the placement of timeouts (which are currently unimplemented). Any event now has the possibility of a timeout. To get an application-level timeout, you''d just post an event with a timeout to a nil target. When the timeout expires, the errback
2007 Sep 14
3
epoll appears to break
The following program is a minor variant on the sample given in the README with eventmachine-0.8.1. I am running under CentOS 4.5 (kernel 2.6.9-55.0.2.plus.c4) with a ruby-1.8.5 RPM from the CentOS testing repository. When I run it, I find that set_comm_inactivity_timeout doesn''t do anything. That is, if I client opens a connection, it stays open indefinitely. However, if I comment out
2008 Aug 06
6
Event loop responsiveness + client
Hello, on the application that I''m working on, we are using Thin. The server implements long polling and commands that alter its internal state. Connecting to the long poll is a very fast operation, while updating the state of the server is a relatively slow operation. The long poll connection is held open until there is a change to be sent to the connection. Here is my current
2008 Jan 14
10
Using EventMachine to listen from non-network
I''ve actually found a way to make EventMachine listen to events from a serial port, but only by using the pure Ruby version, using Guilliame Pierronnet''s Ruby/SerialPort library. It turned out to be simpler than I thought it would be: require ''serialport'' $eventmachine_library = :pure_ruby require ''eventmachine'' module EventMachine class
2007 Dec 25
6
error: no marshal_dump is defined for class Thread
I get this error periodically in backgroundrb.log, but only on my production box (the one running ruby 1.8.5) - my dev box doesn''t get this error. As far as I can tell, everything is working ok, despite the error (I don''t really know how to determine if the jobs are getting threaded successfully, but they are running, that I am sure of). Here''s the dump: no
2006 Aug 20
14
http parser
Just thought I''d let you know that your http parser worked great for creating an http protocol handler for Eventmachine. It wouldn''t take that much effort to use Eventmachine for Mongrel, might be worth a shot just to see how it does. A few things would need to be restructered, like HttpRequest where you read the rest of the body, and calling the handler. But it
2023 Feb 11
1
scan(..., skip=1e11): infinite loop; cannot interrupt
On Fri, 10 Feb 2023 23:38:55 -0600 Spencer Graves <spencer.graves at prodsyse.com> wrote: > I have a 4.54 GB file that I'm trying to read in chunks using > "scan(..., skip=__)". It works as expected for small values of > "skip" but goes into an infinite loop for "skip=1e11" and similar > large values of skip: I cannot even interrupt it; I
2009 Feb 05
3
maptools: Test if point is in polygon
In R's maptools package, is there a built-in function to test if a given point is "inside" a given polygon on the map? The map was loaded from an ESRI Shapefile. The point's latitude and longitude are known. Thank you! Aleks -- ------------------------ Aleksandr Andreev Fulbright Fellow Graduate School of Management St Petersburg State University
2008 Mar 29
3
Generating maps in R
Greetings! I am trying plot some data on a map in R. Here's the scenario. I have a variable called probworkinghealthy which contains a predicted probability of employment for every individual in my sample (about 100,000 observations). I have another variable, called a001ter, which contains the subject of residency in the Russian Federation (akin to a US state) for every individual in the
2012 Jan 22
2
Best practices?
Suppose I start building nodes with (say) 24 drives each in them. Would the standard/recommended approach be to make each drive its own filesystem, and export 24 separate bricks, server1:/data1 .. server1:/data24 ? Making a distributed replicated volume between this and another server would then have to list all 48 drives individually. At the other extreme, I could put all 24 drives into some