www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 5356] New: receiveTimeout value < 500 does not work.

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5356

           Summary: receiveTimeout value < 500 does not work.
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: druntime
        AssignedTo: sean invisibleduck.org
        ReportedBy: joost.t.hart planet.nl


--- Comment #0 from Joost <joost.t.hart planet.nl> 2010-12-18 15:14:25 PST ---
See the code snippets below.

$ cat time.d
import std.concurrency;
import std.conv;

void run( long tim )
{
    foreach( dum; 0 .. 100 )
    {
        receiveTimeout( tim, (int x){} );
    }
}

void main( string[] args )
{
    run( to!long( args[1] ) );
}
$ time ./time 500

real    0m49.673s
user    0m0.000s
sys    0m0.000s
$ time ./time 499

real    0m0.972s
user    0m0.000s
sys    0m0.000s
$

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 18 2010
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5356



--- Comment #1 from Joost <joost.t.hart planet.nl> 2010-12-18 15:33:10 PST ---
Thought following output could be of interest (there's no 2.050 version field
yet):

$ dmd -v time.d
binary    /local/dmd2/usr/bin/dmd
version   v2.050
config    /etc/dmd.conf
parse     time
importall time
import    object    (/local/dmd2/usr/include/d/dmd/druntime/import/object.di)
import    std.concurrency   
(/local/dmd2/usr/include/d/dmd/phobos/std/concurrency.d)
import    core.atomic   
(/local/dmd2/usr/include/d/dmd/druntime/import/core/atomic.di)
import    core.sync.barrier   
(/local/dmd2/usr/include/d/dmd/druntime/import/core/sync/barrier.di)
import    core.sync.exception   
(/local/dmd2/usr/include/d/dmd/druntime/import/core/sync/exception.di)
import    core.sync.condition   
(/local/dmd2/usr/include/d/dmd/druntime/import/core/sync/condition.di)
import    core.sync.mutex   
(/local/dmd2/usr/include/d/dmd/druntime/import/core/sync/mutex.di)
import    core.sys.posix.pthread   
(/local/dmd2/usr/include/d/dmd/druntime/import/core/sys/posix/pthread.di)
import    core.sys.posix.config   
(/local/dmd2/usr/include/d/dmd/druntime/import/core/sys/posix/config.di)
import    core.stdc.config   
(/local/dmd2/usr/include/d/dmd/druntime/import/core/stdc/config.di)
import    core.sys.posix.sys.types   
(/local/dmd2/usr/include/d/dmd/druntime/import/core/sys/posix/sys/types.di)
import    core.stdc.stdint   
(/local/dmd2/usr/include/d/dmd/druntime/import/core/stdc/stdint.di)
import    core.stdc.stddef   
(/local/dmd2/usr/include/d/dmd/druntime/import/core/stdc/stddef.di)
import    core.stdc.signal   
(/local/dmd2/usr/include/d/dmd/druntime/import/core/stdc/signal.di)
import    core.stdc.wchar_   
(/local/dmd2/usr/include/d/dmd/druntime/import/core/stdc/wchar_.di)
import    core.stdc.stdarg   
(/local/dmd2/usr/include/d/dmd/druntime/import/core/stdc/stdarg.di)
import    core.stdc.stdio   
(/local/dmd2/usr/include/d/dmd/druntime/import/core/stdc/stdio.di)
import    core.stdc.time   
(/local/dmd2/usr/include/d/dmd/druntime/import/core/stdc/time.di)
import    core.sys.posix.sched   
(/local/dmd2/usr/include/d/dmd/druntime/import/core/sys/posix/sched.di)
import    core.sys.posix.time   
(/local/dmd2/usr/include/d/dmd/druntime/import/core/sys/posix/time.di)
import    core.sys.posix.signal   
(/local/dmd2/usr/include/d/dmd/druntime/import/core/sys/posix/signal.di)
import    core.sync.config   
(/local/dmd2/usr/include/d/dmd/druntime/import/core/sync/config.di)
import    core.sys.posix.sys.time   
(/local/dmd2/usr/include/d/dmd/druntime/import/core/sys/posix/sys/time.di)
import    core.sys.posix.sys.select   
(/local/dmd2/usr/include/d/dmd/druntime/import/core/sys/posix/sys/select.di)
import    core.stdc.errno   
(/local/dmd2/usr/include/d/dmd/druntime/import/core/stdc/errno.di)
import    core.sync.rwmutex   
(/local/dmd2/usr/include/d/dmd/druntime/import/core/sync/rwmutex.di)
import    core.sync.semaphore   
(/local/dmd2/usr/include/d/dmd/druntime/import/core/sync/semaphore.di)
import    core.sys.posix.semaphore   
(/local/dmd2/usr/include/d/dmd/druntime/import/core/sys/posix/semaphore.di)
import    std.variant    (/local/dmd2/usr/include/d/dmd/phobos/std/variant.d)
import    std.traits    (/local/dmd2/usr/include/d/dmd/phobos/std/traits.d)
import    std.typetuple   
(/local/dmd2/usr/include/d/dmd/phobos/std/typetuple.d)
import    std.c.string    (/local/dmd2/usr/include/d/dmd/phobos/std/c/string.d)
import    core.stdc.string   
(/local/dmd2/usr/include/d/dmd/druntime/import/core/stdc/string.di)
import    std.conv    (/local/dmd2/usr/include/d/dmd/phobos/std/conv.d)
import    core.stdc.math   
(/local/dmd2/usr/include/d/dmd/druntime/import/core/stdc/math.di)
import    core.memory   
(/local/dmd2/usr/include/d/dmd/druntime/import/core/memory.di)
import    core.stdc.stdlib   
(/local/dmd2/usr/include/d/dmd/druntime/import/core/stdc/stdlib.di)
import    std.algorithm   
(/local/dmd2/usr/include/d/dmd/phobos/std/algorithm.d)
import    std.array    (/local/dmd2/usr/include/d/dmd/phobos/std/array.d)
import    std.c.stdio    (/local/dmd2/usr/include/d/dmd/phobos/std/c/stdio.d)
import    std.encoding    (/local/dmd2/usr/include/d/dmd/phobos/std/encoding.d)
import    std.string    (/local/dmd2/usr/include/d/dmd/phobos/std/string.d)
import    core.exception   
(/local/dmd2/usr/include/d/dmd/druntime/import/core/exception.di)
import    std.ctype    (/local/dmd2/usr/include/d/dmd/phobos/std/ctype.d)
import    std.exception   
(/local/dmd2/usr/include/d/dmd/phobos/std/exception.d)
import    std.range    (/local/dmd2/usr/include/d/dmd/phobos/std/range.d)
import    std.functional   
(/local/dmd2/usr/include/d/dmd/phobos/std/functional.d)
import    std.metastrings   
(/local/dmd2/usr/include/d/dmd/phobos/std/metastrings.d)
import    std.stdio    (/local/dmd2/usr/include/d/dmd/phobos/std/stdio.d)
import    std.stdiobase   
(/local/dmd2/usr/include/d/dmd/phobos/std/stdiobase.d)
import    std.file    (/local/dmd2/usr/include/d/dmd/phobos/std/file.d)
import    std.date    (/local/dmd2/usr/include/d/dmd/phobos/std/date.d)
import    std.datebase    (/local/dmd2/usr/include/d/dmd/phobos/std/datebase.d)
import    std.dateparse   
(/local/dmd2/usr/include/d/dmd/phobos/std/dateparse.d)
import    std.c.stdlib    (/local/dmd2/usr/include/d/dmd/phobos/std/c/stdlib.d)
import    std.format    (/local/dmd2/usr/include/d/dmd/phobos/std/format.d)
import    std.bitmanip    (/local/dmd2/usr/include/d/dmd/phobos/std/bitmanip.d)
import    std.intrinsic   
(/local/dmd2/usr/include/d/dmd/phobos/std/intrinsic.d)
import    std.stdarg    (/local/dmd2/usr/include/d/dmd/phobos/std/stdarg.d)
import    std.system    (/local/dmd2/usr/include/d/dmd/phobos/std/system.d)
import    std.typecons    (/local/dmd2/usr/include/d/dmd/phobos/std/typecons.d)
import    std.utf    (/local/dmd2/usr/include/d/dmd/phobos/std/utf.d)
import    std.path    (/local/dmd2/usr/include/d/dmd/phobos/std/path.d)
import    std.process    (/local/dmd2/usr/include/d/dmd/phobos/std/process.d)
import    std.c.process   
(/local/dmd2/usr/include/d/dmd/phobos/std/c/process.d)
import    std.c.stddef    (/local/dmd2/usr/include/d/dmd/phobos/std/c/stddef.d)
import    core.sys.posix.stdlib   
(/local/dmd2/usr/include/d/dmd/druntime/import/core/sys/posix/stdlib.di)
import    core.sys.posix.sys.wait   
(/local/dmd2/usr/include/d/dmd/druntime/import/core/sys/posix/sys/wait.di)
import    core.sys.posix.unistd   
(/local/dmd2/usr/include/d/dmd/druntime/import/core/sys/posix/unistd.di)
import    core.sys.posix.inttypes   
(/local/dmd2/usr/include/d/dmd/druntime/import/core/sys/posix/inttypes.di)
import    core.stdc.inttypes   
(/local/dmd2/usr/include/d/dmd/druntime/import/core/stdc/inttypes.di)
import    core.sys.posix.pwd   
(/local/dmd2/usr/include/d/dmd/druntime/import/core/sys/posix/pwd.di)
import    std.regexp    (/local/dmd2/usr/include/d/dmd/phobos/std/regexp.d)
import    std.outbuffer   
(/local/dmd2/usr/include/d/dmd/phobos/std/outbuffer.d)
import    std.c.stdarg    (/local/dmd2/usr/include/d/dmd/phobos/std/c/stdarg.d)
import    core.sys.posix.dirent   
(/local/dmd2/usr/include/d/dmd/druntime/import/core/sys/posix/dirent.di)
import    core.sys.posix.fcntl   
(/local/dmd2/usr/include/d/dmd/druntime/import/core/sys/posix/fcntl.di)
import    core.sys.posix.sys.stat   
(/local/dmd2/usr/include/d/dmd/druntime/import/core/sys/posix/sys/stat.di)
import    core.sys.posix.utime   
(/local/dmd2/usr/include/d/dmd/druntime/import/core/sys/posix/utime.di)
import    core.sys.posix.stdio   
(/local/dmd2/usr/include/d/dmd/druntime/import/core/sys/posix/stdio.di)
import    std.c.linux.linux   
(/local/dmd2/usr/include/d/dmd/phobos/std/c/linux/linux.d)
import    std.c.linux.pthread   
(/local/dmd2/usr/include/d/dmd/phobos/std/c/linux/pthread.d)
import    core.sys.posix.dlfcn   
(/local/dmd2/usr/include/d/dmd/druntime/import/core/sys/posix/dlfcn.di)
import    core.sys.posix.sys.mman   
(/local/dmd2/usr/include/d/dmd/druntime/import/core/sys/posix/sys/mman.di)
import    std.c.linux.socket   
(/local/dmd2/usr/include/d/dmd/phobos/std/c/linux/socket.d)
import    core.sys.posix.arpa.inet   
(/local/dmd2/usr/include/d/dmd/druntime/import/core/sys/posix/arpa/inet.di)
import    core.sys.posix.sys.socket   
(/local/dmd2/usr/include/d/dmd/druntime/import/core/sys/posix/sys/socket.di)
import    core.sys.posix.sys.uio   
(/local/dmd2/usr/include/d/dmd/druntime/import/core/sys/posix/sys/uio.di)
import    core.sys.posix.netinet.tcp   
(/local/dmd2/usr/include/d/dmd/druntime/import/core/sys/posix/netinet/tcp.di)
import    core.sys.posix.netinet.in_   
(/local/dmd2/usr/include/d/dmd/druntime/import/core/sys/posix/netinet/in_.di)
import    std.math    (/local/dmd2/usr/include/d/dmd/phobos/std/math.d)
import    std.random    (/local/dmd2/usr/include/d/dmd/phobos/std/random.d)
import    std.c.time    (/local/dmd2/usr/include/d/dmd/phobos/std/c/time.d)
import    std.numeric    (/local/dmd2/usr/include/d/dmd/phobos/std/numeric.d)
import    std.complex    (/local/dmd2/usr/include/d/dmd/phobos/std/complex.d)
import    core.thread   
(/local/dmd2/usr/include/d/dmd/druntime/import/core/thread.di)
import    std.regex    (/local/dmd2/usr/include/d/dmd/phobos/std/regex.d)
import    std.uni    (/local/dmd2/usr/include/d/dmd/phobos/std/uni.d)
import    std.container   
(/local/dmd2/usr/include/d/dmd/phobos/std/container.d)
semantic  time
semantic2 time
semantic3 time
code      time
function  run
function  __dgliteral1
function  main
function  receiveTimeout
function  checkops
function  get
function  onStandardMsg
function  onLinkDeadMsg
function  onControlMsg
function  scan
function  pty
function  convertsTo
function  convertsTo
function  map
function  get
function  convertsTo
function  convertsTo
function  get
function  get
function  this
function  opAssign
function  handler
function  getPtr
function  tryPutting
function  opCmp
function  to
function  toImpl
function  to
function  front
function  toImpl
function  this
function  opAssign
function  handler
function  getPtr
function  tryPutting
function  to
function  toImpl
function  convertsTo
function  convertsTo
function  get
function  get
function  convertsTo
function  convertsTo
function  get
function  get
function  to
function  toImpl
function  parseString
function  front
function  empty
function  popFront
function  parse
function  convError
function  to
function  toImpl
function  to
function  toImpl
function  convError
gcc time.o -o time -m32 -Xlinker -L/local/dmd2/usr/lib -Xlinker
--export-dynamic -lphobos2 -lpthread -lm 
$

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 18 2010
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5356


Joost <joost.t.hart planet.nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


--- Comment #2 from Joost <joost.t.hart planet.nl> 2010-12-22 09:16:14 PST ---
The problem does no longer show in D2.051

Thanks!

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 22 2010