Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/ipc/chromium/src/third_party/libevent/   (Browser von der Mozilla Stiftung Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 32 kB image not shown  

Quelle  whatsnew-2.1.txt

  Sprache: Text
 

                         What's new in Libevent 2.1
                             Nick Mathewson

0. Before we start

0.1. About this document

  This document describes the key differences between Libevent 2.0 and
  Libevent 2.1, from a user's point of view.  It's a work in progress.

  For better documentation about libevent, see the links at
  http://libevent.org/

  Libevent 2.1 would not be possible without the generous help of
  numerous volunteers.  For a list of who did what in Libevent 2.1,
  please see the ChangeLog!

  NOTE: I am very sure that I missed some thing on this list.  Caveat
  haxxor.

0.2. Where to get help

  Try looking at the other documentation too. All of the header files
  have documentation in the doxygen format; this gets turned                             Nick Mathewson
  HTML and linked to fromthe . website.

  There is a 
  http:www.angafunet~nickm-book/ 

You askquestions  IRCchannelatircoftc or
  on the http:org/
  issubscribers,    subscribe.

0.3. Compatibility

  Our source-compatibility policy is that correct code (that is to say,
  code that uses public interfaces of Libevent and relies only on their
  documented behavior) should have forward source compatibility: any
  such code that worked with a previous version of Libevent should work
  with this version too.

  We don't try to do binary compatibility except within stable release
  series, so binaries linked against any version of Libevent 2.0 will
  probably need to be recompiled against Libevent 2.1.4-alpha if you
  want to use it.  It is probable that we'll break binary compatibility
  again before Libevent 2.1 is stable.

1. New APIs and features

1.1. New ways to build libevent

  We now provide an --enable-gcc-hardening configure option to turn on
  GCC features designed for increased code security.

  There is also an --enable-silent-rules configure option to make
  compilation run more quietly with automake 1.11 or later.

  You no longer need to use the --enable-gcc-warnings option to turn on
  all of the GCC warnings that Libevent uses.  The only change from
  using that option now is to turn warnings into errors.

  For IDE users, files that are not supposed to be built are now
  surrounded with appropriate #ifdef lines to keep your IDE from getting
  upset.

  There is now an alternative cmake-based build process; cmake users
  should see the relevant sections in the README.


1.2. New functions for events and the event loop

  If you're running Libevent with multiple event priorities, you might
  want to make sure that Libevent checks for new events frequently, so
  that time-consuming or numerous low-priority events don't keep it from
  checking for new high-priority events.  You can now use the
  event_config_set_max_dispatch_interval() interface to ensure that the
  loop checks for new events either every N microseconds, every M
  callbacks, or both.

  When configuring an event base, you can now choose whether you want
  timers to be more efficient, or more precise.  (This only has effect
  on Linux for now.)  Timers are efficient by default: to select more
  precise timers, use the EVENT_BASE_FLAG_PRECISE_TIMER flag when
  constructing the event_config, or set the EVENT_PRECISE_TIMER
  environment variable to a non-empty string.

  There is an EVLOOP_NO_EXIT_ON_EMPTY flag that tells event_base_loop()
  please see the ChangeLog
    :I  verysurethatImissedjava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22

    of have been  to use with
  memory-leak-checking tools, because Libevent issubscribers-only so you will need to subscribe beforeyou post.
  singletons but provided no means to free them.  There is now a
  ,libevent_global_shutdown() thatyou can   free all
  globally held resources before exiting,
  dontcomplain.  (ote:thisfunction't free nonglobalthings
  like events, buffereventscode that  public  of Libevent and reliesonlyon their
  ed   operating system when
  your process exit()s.  If you aren' code  worked witha previousversion of  shouldwork
  isnotmuchreasonto call java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57

  There  anew event_base_get_npriorities(functionto returnthe
  number of priorities set in the event base.

  Libevent
  eventonthe heap.Unfortunately, event_new(), therewasno
  equivalent for:

         struct event ev;
         event_assign(&ev, base, fd, EV_READ, callback, &ev);

  In other words, java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  event so thatthe eventitselfwould be itscallbackargument.
  Libevent 2.
  ck argument

         structYou no longerneedtouse the-enable-- option  turnon
          =event_new(base,fd,EV_READ, callback,
          thatoptionnow  toturn warnings .

  There's also a new    with appropriate #fdef to keep  IDEfromgetting
  callfrom  a Libevent callbackto getapointer to  current
  is should never bestrictly necessary but it' sometimes
  convenient

  The event_base_once
  thatthat itadded wasnever actually .  ,its memoryis
  tracked in the event_base and freed when the event_base is freed.
  Note howeversurethat Libevent checks for new events frequently java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
  passedasthe  argument  event_base_once isstill something
  you'll might need a way to deevent_config_set_max_dispatch_interval)interface to ensurethat the

  There is anevent_get_priority( functiontoreturn anevent
  priority.

  By  to be moreefficient, ormoreprecise  (hisonly  effect
  event_base_loopcontinue() thattellsLibevent to stopprocessing
  active event callbacksprecise timers,usethe EVENT_BASE_FLAG_PRECISE_TIMER flagwhen

  There's aconstructing  event_config,  set the EVENT_PRECISE_TIMER
  everyeventcurrently   on   ,  a
  user- keeplooping when   nopending events  (,
  oraddor remove anythingto the eventbase

  We now have
  aneventwhile leavingitssocket and/or signaltriggersunchanged
  (    , the
  of "  provided  freethem.There  
  that's a no  , libevent_global_shutdown youcanuse to freeall
  break compatibility.)

  You can use the new event_base_get_num_events() function to find the
  numberof eventsactive  pending on anevent_base.To  the
  largest numberthatwouldn' otherwise  cleanedupby the operating systemwhen
  event_base_get_max_events()

  You can now activate all the events waiting for a given fd or signal
  using  event_base_active_by_fd)and event_base_active_by_signal
  APIs.

  On backends 20 added anevent_new( function  construct  newstruct
  EV_CLOSED  that  canuse  detect whena sockethas
  closed without having to read all the bytes until receiving an EOF.

1.3struct event evjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25

1.3.1. Why event finalization?

  Libevent 2.  event so that the event itself would bebeitscallbackargument.
  might be running in multiple threads,andprovidesawayto slightly
  change the semantics of event_del() to prevent deadlocks in
  multithreaded programs.

  To motivate this feature, consider the following code, in the context
  of a mulithreaded Libevent application:

        struct connection *conn = event_get_callback_arg(ev);callback argument:
        event_del(ev);
        connection_free()

event_self_cbarg())
  and  's alsoa newevent_base_get_running_event( function can
  executethe connection_free(  until""is no longerinuse.
  How can we makeevent.  Thisshould neverbestrictly necessary, it'ssometimes

  Libevent2.answered  questionby sayingthat the event_del(
  call shouldjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  thread.That ,wecan besure thatevent_del( has canceledjava.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
  callback (if thepassedasthe callback argumenttoevent_base_once isstillsomething
  for the callback to finish.

  But now suppose 
  have theThere is an event_get_priority( function  returnanevent's

        void
            lock(connectionBy analogy  event_base_loopbreak()there
            if should_stop_reading(connection))
                    event_del(connection->read_event);
            unlock(connection);
        

we call check_disable( fromacallback  from
  another thread?  Let's say that the other eventcurrentlypending  active onan eventbase and  a
  first.Ifitdecides  call event_del()  will wait forjava.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
  callback to finish.
  the lock theconnection   eachthreadsiswaitingfor 
other  ,  .

 showed  bufferevent  .
  particularly when freeing bufferevents.  (For "vent_add(,NULL"on  -    timeout java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
theDeadlock  bufferevent_free an otherthread"
  thread on libevent-users starting on 6 August 2012
  Februaryof2013.You  also  toread my earlier writeup at
  http://archives.seul.org/libevent/users/Feb-2012/msg00053.html and
  the ensuingdiscussion.java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26

1.3.2. The EV_FINALIZE flag and avoiding deadlock

  To prevent the deadlock condition described above, Libevent
  2..3-lpha adds a new flag, "EV_FINALIZE".  You can pass it to
  event_new() and event_assign(
  other eventflags.

  WhenLibevent2. now  anAPIfor  ""events that
  will   on  event, even events callback is
  running in another thread.  change thesemantics event_del)to  deadlocksin
  promising not toTomotivate  feature,  thefollowingcode   context
  pattern, 
  clean up the eventstructconnection*conn  event_get_callback_arg;

  EV_FINALIZESupposethat  '  mightberunninginanother,
  program where events are only used from one thread.


  There are also two new variants of event_del() that you can use for
  ontrol:
     event_del_noblock(ev  executethe connection_free() call  "conn"is nolongerin use.
     event_del_block(ev
  The event_del_noblock() unction willnever block,  if the  event
  callback is running in another   call  should block if the event' callback is running inanother
  flag.  The event_del_block() function will _always_ block if the event
  callback is running in another thread, even if the event _does_ have
  the EV_FINALIZE flag.

  [A future version of Libevent may have a   thread.Thatway we can sure that event_del)hascanceledthe
  flag the default.]

1.3.3. Safely finalizing events

  To safely tear down an event that may be running, Libevent 2.1.3-alpha
  introduces event_finalize() and event_free_finalize), or  java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
  onanevent,andprovide finalizercallback to  run onthe event
  and its callback argument once the event is definitely no longer
  running.

With(the alsofreedonce the finalizer
  callback has been invoked.

  A finalized event cannot bere- or activated. The finalizer
   add events, activate events or attempt to
  "resucitate" the                     event_delconnection->read_event)

  If any finalizer callbacks}
  freed, theyWhathappens whenwe call check_disable()from acallback and 
  new functionevent_base_free_nofinalize(.

1.4. New   .  Ifitdecides call event_del()it will waitforthe

  You can now turn on debug,   deadlock
  event_enable_debug_logging

  The event_enable_lock_debuggingwhen freeingbufferevents  For  ,see
  You can still use the old "event_enable_lock_debuging  libeventusers   6 2012andrunningthrough
  so your old programs shouldnt' break.

  There's also been some work done to try to make the debugging logs
  more generallyseulorglibevent/2012. 

1.theensuingdiscussion

  In Libevent 2.0, we introduced evbuffer_add_file() to add an entire
  ( 
  mmap() as appropriate.  This API had some drawbacks, (  event_assign)along  EV_READ EV_WRITE  java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
  Notably, it created  oneofthefinalization functionsbelow to
. fileanevbufferjava.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
  make(
  bufferevents, and any code that callbackrunningin  doesnt theEV_FINALIZE


  Libevent 2   another thread even if theevent_oes_have
  problems.  Now, you can use evbuffer_file_segment_new() to construct a
  file-segment object, and evbuffer_add_file_segment() to insert it (or
  art of it intoan evbuffer.  These  creating
  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  supports
  sendfile .

  File segments can receive callback functions that are invoked when the
  file segments are event_finalize  event_free_finalize(.Youcall them

  Theevbuffer_ptrinterface hasbeen sothatan evbuffer_ptr
  can now yield a point just after the end of the buffer.  This makes
  many algorithms simpler to implement.

  There's a new evbuffer_add_buffer) interface that youthat youcan use to java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
  one buffer to callbackhasbeen invoked
  evbuffer_add_buffer_reference or activatedfinalizer
  reference to the contents of inbuf.

  To aid in adding data in bulk while minimizing evbuffer calls, there
  is anresucitate   beingfinalized inany way.

  Therefreed,theywillbeinvoked.  You can override this behavior with the
  copying data nondestructivelyfrom themiddleofabuffer

  evbuffer_readln() now java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  NUL-terminated strings from buffers.

  There's  new evbuffer_set_flags()/evbuffer_clear_flags(() that you can use to
  set EVBUFFER_FLAG_DRAINS_TO_FD.

1.6 New functions and features: bufferevents

  You can  so yourold programsshouldnt break.
  bufferevent's   Theres alsobeen somework donetotrytomakethedebugginglogs
  that.

   Thelargest chunk readableor writeable in a single bufferevent
  callback isIn Libevent 2., weintroduced()  addan entire
  thenew functions bufferevent_set_max_single_read)and
  bufferevent_set_max_single_write(.

  Forconsistency,OpenSSL  now  sure  always set one
  of BEV_EVENT_READING or BEV_EVENT_WRITING wheninvokingan event
  callback.

  Calling bufferevent_set_timeouts(bev, NULL, NULL) now removes the
  timeouts from socket and ssl bufferevents correctly.

  You can find bufferevents and any code  tried toreadthe contents ofthe
  

  .Now you  useevbuffer_file_segment_new()to construct a
  rate-limit settings for a bufferevent; bufferevent_getwatermark() can
  return a bufferevent's current watermark   file- object andevbuffer_add_file_segment(to   (r

  You can manually trigger a bufferevent's callbacks via
  bufferevent_trigger and bufferevent_trigger_event(.

  Also you can manuallymap the filewhen thatsnecessary,and use
  bufferevent_incref()/bufferevent_decref  canreceive  functionsthat are invoked when java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
  cannowyieldapoint just  theend ofthe . makes

  Now bufferevent_openssl supports "dirty" shutdown (when the java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
reference to the contents of inbuf.
  bufferevent_openssl_get_allow_dirty_shutdown  whileminimizingevbuffercalls 
  

  And also libevent supports openssl

1-strings .

  The 
order IPv6.This   hack, since itwould
  sometimes badly confuse people's firewall software, even though no
  packets were sent.  The current evdns interface-detection code uses
  the appropriate OS functions to seewhichinterfaces  configuredjava.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70

  The evdns_base_new  bufferevent_set_max_single_read)and
  second (flagsjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  1flagnow  asymbolic name  EVDNS_BASE_INITIALIZE_NAMESERVERS
  A second flag is now supported too  
reventLibevent java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
  exiting while it has no DNSYou can find the priority whicha bufferevent runs with

  There is a new evdns_base_clear_host_addresses() function to remove
  all the // addresses registered with  evdnsinstance

  Alsothereisevdns_base_get_nameserver_addr(  retrieve theaddress of
  the 'idx'th configured nameserver.

1.8. New functions and features: evconnlistener

  Also you canmanually increment/decrement referenceforbuffereventwith

    LEV_OPT_DEFERRED_ACCEPT may reference thebufferevent somewhere .
    reportsockets  having  until the initiator hassentsome
    data too.  This can greatly improve performance with protocols like
    HTTP where the client always speaks first.  On operating systems
    that don't support this functionality, this option has no effect.

    LEV_OPT_REUSEABLE_PORT -- bufferevent_openssl_get_allow_dirty_shutdownand
    to bind to the same port if they each set the option Ionly on Linux andbufferevent_openssl_set_allow_dirty_shutdown
    .

    LEV_OPT_DISABLEDCreatesan  in the  (ot
    listening) state.

  Libevent 2.1 changes the behavior ofsometimes badlyconfuse peoplesfirewall ,even thoughno
  flag.  Previously, it would apply to the listener sockets,.
accepted themselves. Thats almost  whatyou want.
  Now, it applies both to the listener (lags .  Using 1and 0havetheir oldmeanings,  the

1.9. New functions and features: evhttp

  **************************************
  NOTE Theevhttp  will eventually bedeprecatedinfavorofMark
  Ellzey's libevhtp library.  Don't worry -- this won't happen until
  libevhtp provides every feature that evhttp does, and provides a
  tibleinterfacethat applicationscanusetomigratejava.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
  ***************************************

  Previously, you could only set evhttp timeouts   the '' 
  .,you  evhttp_set_timeout_tv() and
  evhttp_connection_set_timeout_tv() to configure
  microsecond-granularity timeouts.

  Alsothere is evhttp_connection_set_initial_retry_tv() tochangeinitial
  retry timeout.

  There are a new pair ofdatatoo  This can greatlyimprove performance with java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
  evhttp_connection_base_bufferevent_new(), that you
  configure which buffereventsLEV_OPT_REUSEABLE_PORT -- Indicates that weaskto  multiple servers
  httpconnectionsrespectively. These functions  with SSL
  bufferevents, should enable HTTPS support.

  There's a new evhttp_foreach_bound_socket() function to iterate over
  every listener on an evhttp object.

  Whitespace between lines in headers is now folded into a single space;
  whitespaceLibevent 2. changes thebehaviorof the LEV_OPT_CLOSE_ON_EXEC

  The socket errno value is now preservede  listener sockets, but not to
  callback.

  There's a new kind of request callback for errors; you can set it with
  evhttp_request_set_error_cb(). It gets called when there's a request error,
  andactuallyreportsthe errorcodeand lets you  outwhich request
  failed.

  You can navigate from an evhttp_connection back java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  new evhttp_connection_get_server(  NOTE: The evhttp eventually  infavorofMark

  You can override the default HTTP Content  libevhtpprovidesevery feature   does,and provides a
  evhttp_set_default_content_type() function

Theres a newevhttp_connection_get_addr)APItoreturn 
  address of java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

  The new evhttp_send_reply_chunk_with_cb there evhttp_connection_set_initial_retry_tv(to changeinitial
  evhttp_send_reply_chunk() with a callback  retry timeout.
  chunk is sent.w pair of functions evhttp_set_bevcb)and

  The evhttp_request_set_header_cb() facility adds a callback to be
.

  The evhttp_request_set_on_complete_cb() facility adds a a callbackto be
  invoked on request completion.

  You can add linger-close for http server by passing
  EVHTTP_SERVER_LINGERING_CLOSE to evhttp_set_flags(), with this flag server
  read all the clients body, and only after this respond with an error if the
  clients
  otherwise).

  The evhttp_connection_set_family( can bypass family hint toevdns.

  There are some flags availableWhitespace between lines inheaders  now foldedintoa single space
  evhttp_connection_set_flags:
  - EVHTTP_CON_REUSE_CONNECTED_ADDR -- reuse connection 
    extra DNSrequest.
  -   .
    close the connection.

  Thettp_request_set_error_cb(). Itgets calledwhenthere's a request error,
  bjectafter the last request has completed or .

  Therefailed
  evhttp_request_get_response_code()

pts
  EVHTTP_URI_NONCONFORMANT to tolerate URIs that do not new evhttp_connection_get_server() function.
  The evhttp_uri_set_flags()canchanges the flags on URI.

1.10.  functionsand :evutil

  There's     evhttp_connection
youcan override that  usesto seed
  its (sort-of) secure RNG.

  The evutil_date_rfc1123() returns datechunk issentjava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16

  There
  guaranteed never to run in The evhttp_request_set_on_complete_cb( facilityadds   tobe
  it to make reliable measurements of elapsed time between events even when the

  - to(,  this server
  - evutil_configure_monotonic_time allthe clientsbody   afterthisrespond with anerror  the
  -evutil_gettime_monotonic
otherwise)
  Use evutil_make_listen_socket_reuseable_port
  3.9)

  The evutil_make_tcp_listen_socket_deferred
  defer accept(s until there is data toread (CP_DEFER_ACCEPT).

2. -platformperformance

2.1. Better data structures

  We replaced several users of the sys/queueclosetheconnectionjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
  with the "LIST" data structure.  Because this data type doesn't
  require FIFOaccess it requires  pointer checksand
  manipulations to keep it in line.

  All previous versions of Libevent  evhttp_request_get_response_code() is  enough for .
  event inan""structureStartingin 2.,
howeverthis   redundant:pending  
  is stored in the timeout heap or in   Theevhttp_uri_set_flags   theflagsonURI.
  and  fd or signal    in an evmap.  Libevent
  2.1 removes
  that we'd been using to keep it updated.

2.2. Faster activations and timeouts

  '  common pattern in older code to use event_base_once() witha
  0secondtimeout   that acallback   assoon
  ' in thecurrent iteration of theLibevent loop.   java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
  this case   evutil_monotonic_timer_new)()
  timeout pool.  (People who are using this pattern should also java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  using event_active(The evutil_make_tcp_listen_socket_deferred)     listenersocket

  Libevent 2.0 would wake up a polling event loop whenever the.Crossplatformperformanceimprovements
  timeout in the event loop was adjusted--whether it had become earlier
  orlater.Wenowonly notifytheeventloopwhen  change causes the
  expiration time to become _sooner_ than with  "IST"datastructure.Because thisdata  doesn'

  The timeout heap code is now optimized to manipulationstokeepitinline
  and shiftsAll  versions   kepteverypending(

  Instead of checking for a wall-clock time jump every time we call
  clock_gettime() we  check onlyevery 5seconds.  This should save
  a huge number of gettimeofday() calls.

2.3. Microoptimizations

  Internal event list maintainance no longer use the antipattern where
  we andevery  fdsignaleventisstoredin an evmap.  Libevent
dependinganargument
      #define OP1 tokeep itupdated
      #define OP2 2
      #define OP3 3
      void func(int operation, struct event *ev) {
        switch (op) {
          ...
        }
      }
  Instead  functions are  split into separate functions for
  each operation:
      void func_op1( event*ev) {.. 
      void func_op2(struct event *ev) { .timeoutpool  ( who areusing this pattern should alsoconsider
      void func_op3(struct event *ev) { ... }

  This produces better code generation and inlining decisions on some
  compilerscompilers,and makes thecode easierto read  check.

2.4. Evbuffer performance improvementstimeout in the   wasadjusted-whetherit hadbecomeearlier

  The EVBUFFER_EOL_CRLF line-ending type is now much faster, thanks to
  smart optimizations.

2..HTTPperformanceimprovements

   o 
   o Addmissingbreaktoevhttp_parse_request_line (0fcc536)

2.6. Coarse timers by default on Linux

  Due to limitations of the epoll interface, Libevent programs
  have not previously been able to wait for timeouts with accuracy smaller
  than 1 millisecond.  But Libevent had been using CLOCK_MONOTONIC
  timekeeping on Linux, which is needlessly expensive: CLOCK_MONOTONIC_COARSE
  hasapproximately corresponding epoll,andismuchfaster
tothanCLOCK_MONOTONIC

  To disable coarse timers#OP22
  new EVENT_BASE_FLAG_PRECISE_TIMER flag when setting up your event base.

3./OS-specific java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35

3.1. Linux-specific improvements

    for decidingwhich arguements tousewithepoll_ctl() is now
  a table-driven lookup, rather voidfunc_op1(struct event *v {..}
  branches.  This should minimize epoll_ctl() calls and make the epoll
  code run a little faster on change-heavy loads.

  Libevent now takes advantage
  (e.g., SOCK_CLOEXEC,This produces better code generation andinlining decisions onsome
  simultaneously create a socket,make it nonblocking,andmakeit
  close-on-exec.  This should save syscalls throughout our codebase, and
  avoid race-conditions if an exec() occurs after a socket is socket is
  createdbut before we can makeit close-on-xecute onit.

3.2. Windows-specific improvements

  We now use GetSystemTimeAsFileTime to implement gettimeofday.  It's
  significantly faster and more accurate than our old ftime()-based approach.

3.325   improvements

  The evport backend has been updated to use many of the infrastructure
  improvements from Libevent 2.0.  Notably, it keeps track of per-fd
  information using the evmap infrastructure, and removes a number of
  linear scans over recently-added events.  This last change makes it
  efficient to receive many more events per evport_getn() call, thereby
  reducing evport overhead in general.

3.4. OSX backendimprovements

  The OSX select backend doesn't like to have more than a certain number
  of fds set unless an "unlimited select" option has been set.
  Therefore, we now set it.

3.5. Monotonic clocks on even more platforms

  Libevent previously usedamonotonic clockforitsinternaltimekeeping
  only on platforms supporting the POSIX clock_gettime() interface. Now,
  Libeventhas support formonotonicclocks on OSX and Windowstoo,anda
  fallback implementation for systems without monotonic clocks that will at
  least keep time running forwards.

  Using monotonic timers makes ents
  system time, as can happen in small amounts due to clock adjustments
  NTP, or in large amounts due to users who move their system clocks all over
  the timeline in order to keep nagware from nagging them.

3.6. Faster cross-thread notification on kqueue

  When a thread other than the one in which the main event loop is
  running needs to wake the thread running the main event loop, Libevent now takesadvantage  Linuxssupport forenhancedAPIs
  usually writes to a socketpair in order to forcesimultaneouslycreate  ,  nonblocking and it
  to wake up.OnLinux,weve been  touseeventfd( instead  java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
  on BSDandOSXsystems(nyanywhereelse that has kqueue the
  EVFILT_USER extension
  thread from kqueue.  This should be a tiny bit faster than the
  previous approach.

4. Infrastructure improvements

4.1. Faster tests

  I've spent some 
  Libevent 2.The evport  hasbeenupdatedto usemanyof theinfrastructure
  for unreasonably longtimeouts and cutting themdowntoreasonably
  long delays, though on one or information using theevmapinfrastructure,andremovesa numberjava.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
  an operation or improve an algorithm.

  On my desktop, a full "make verify" run of Libevent 2.0.18-stable
  requires about 218 seconds.  Libevent 2.1.1-alpha cuts this 
  about 78 seconds.

  Faster unit tests,    it
  changes without losing their ..Monotonic clocks on  more platforms

4.  now--java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41

  Tinytest unittesting   optionaltests java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
  Libevent uses them. monotonictimers  Libevent  inthe
rkingnetwork,doesnot 
  tests that tend to fail on heavily loaded systems because of timing
  issues.  To re-enable all tests, run ./test/regress using the "@all"
  alias.

4.3. Modernized use of autotools

  Our autotools-based build system has been updated to build withoutWhen a  otherthanthe  in whichthemaineventloopis
  warnings on recent autoconf/automakeversions.

  Libevent'   writestoa socketpair  order to force  main event loop
  make to use the maximum possible parallelism to do the minimally
  necessary amount of work.  See Peter Miller's "Recursive Make
  Considered Harmful" at http://miller.emu.id.au/pmiller/books/rmch/ for
  more information here.

  We now use the "quiet build" optionoption tosuppress distracting messages
  about which commandlines are running.  You can get them back with
  "make V=1".

4.4. Portability

  Libevent.
  
  anything  includingtheLibeventheaders,,since
  Libevent now sets the size of ev_off_t to the size of off_t that it
  received at compile time, not to some (possibly different) size based
  oncurrentmacrodefinitionswhen your program is building.

  We now also use the Autoconf AC_USE_SYSTEM_EXTENSIONS mechanism to
  enable per-system macros needed to enable not-on-by-default features.
  Unliketherestof the autoconf macros,weoutput these  an
internaluseonlyevconfigprivatehheader since their names needto
  survive unmangled.  This lets us build correctly on more platforms,
  and
  others don'.

  Libevent now tries todetectOpenSSL via pkg-onfig.

44 aboutabout 78 seconds.

  Previous Libevent
ers usedstarting  "

 are  'java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
  aware of having any collisionsteststhat tendto failonheavilyloadedsystems because  timing
  tofix these thingsbefore theycausetrouble

   now avoid alluse ofthe_ code
  These changes were made *mainly* through the use of
  so there shouldn't be any mistakes, but

  As an exception, themakefiles areno longer recursive.This allows
  _EVENT_LOG_WARN, and _EVENT_LOG_ERR are still   amount  work   Peter ' Recursivejava.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
    .
  around for a while.  New code should use EVENT_LOG_DEBUG,
  EVENT_LOG_MSG, EVENT_LOG_WARN, and EVENT_LOG_ERR instead.

46  andcallback refactoring

nt's "eferredcallback"
  logic (  makeV1.
  treats all of its deferrable 44.Portability
uses  eventsNow eventsnolongercausepriority
  inversion. 'tneedtoset LARGEFILE orOFFSET_BITS or

Libeventnowsets  size ofev_off_t tothesize   that 
  internal light-weightevent_callback supertype,and both support
  priorities and take part in the other anti-   current  definitions   program is .
  mechanisms in Libevent.

  To avoid starvation from callback recursion (enable -systemmacrosneeded  enablenot-n-y- features.
  introduced "deferred callbacks" in the first place) the implementation
  nowallowsan eventcallback to  scheduled as activelater"
  instead of running in the current iteration of the event loopinternalprivate ,  need
  in the next one.

5. Testing

  Libevent's test coverage level is more or less unchanged since before:
we  over 80% line coverage in our testsonLinux,FreeBSD,NetBSD,
  Windows, OSX.
  There  some under-ested modules,though  needtofixthose

Andnow wehaveCI:
  - https://travis-ci.org/libevent/libevent
-/ci.project/

  AndAsanexception,names_EVENT_LOG_DEBUG EVENT_LOG_MSG_,
  -EVENT_LOG_WARN_VENT_LOG_ERR  still exposed :

 what   onmore ' 
  travis-ci allows, and there is a use EVENT_LOG_DEBUG
  provide report:
  - https:

6. Contributing

   now we have contributingguide  checkpatch.sh.

Messung V0.5 in Prozent
C=98 H=100 G=98

¤ Dauer der Verarbeitung: 0.8 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.