Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #76693

Re: Data IO for project

From "Morten W. Petersen" <morphex@gmail.com>
Newsgroups comp.lang.c
Subject Re: Data IO for project
Date 2015-11-21 00:37 +0100
Organization Aioe.org NNTP Server
Message-ID <n2oarp$aak$1@speranza.aioe.org> (permalink)
References (1 earlier) <0e4410a8-8ef1-4b0e-847c-b586828b8b04@googlegroups.com> <n2l1mc$sud$1@speranza.aioe.org> <t6is4b1euj2sbtgeh8rta1gsb0rmbpcd89@4ax.com> <n2loor$t05$1@speranza.aioe.org> <nget4blaaen0h2snsgaol5raju51jr826q@4ax.com>

Show all headers | View raw


On 20.11.2015 07:15, Robert Wessel wrote:
> On Fri, 20 Nov 2015 01:16:41 +0100, "Morten W. Petersen"
> <morphex@gmail.com> wrote:
>
>> On 19.11.2015 23:17, Robert Wessel wrote:
[...]
>>> And if you didn't plan for this from the start, this will probably do
>>> more than a bit of violence to the existing structure of your code.
>>
>> Yes, this is the issue.  If a user controls the network connection for
>> example, and feeds 1024 bytes at a time to the feed function, this is
>> what needs to be handled.
>>
>> But maybe a choice can be made, so that the library can be compiled
>> without integrator-level control of streams, so that if a user does
>> need to feed the parser, the parser can run in a thread and check
>> for new input via some queue or linked list.
>
>
> Restructuring as a state machine has the advantage that you end up
> with only one version of the code with two small wrappers.  You also
> avoid the portability issues of threads, and the inter-thread
> communications performance issues if the chunks being read are small.

OK.  I'll give this some thought.

-Morten

Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Data IO for project "Morten W. Petersen" <morphex@gmail.com> - 2015-11-19 16:03 +0100
  Re: Data IO for project Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-11-19 08:12 -0800
    Re: Data IO for project "Morten W. Petersen" <morphex@gmail.com> - 2015-11-19 18:42 +0100
      Re: Data IO for project Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-11-19 12:15 -0800
      Re: Data IO for project Robert Wessel <robertwessel2@yahoo.com> - 2015-11-19 16:17 -0600
        Re: Data IO for project "Morten W. Petersen" <morphex@gmail.com> - 2015-11-20 01:16 +0100
          Re: Data IO for project Robert Wessel <robertwessel2@yahoo.com> - 2015-11-20 00:15 -0600
            Re: Data IO for project "Morten W. Petersen" <morphex@gmail.com> - 2015-11-21 00:37 +0100
  Re: Data IO for project Nobody <nobody@nowhere.invalid> - 2015-11-19 19:59 +0000
    Re: Data IO for project "Morten W. Petersen" <morphex@gmail.com> - 2015-11-20 01:26 +0100
      Re: Data IO for project Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-11-19 16:46 -0800
      Re: Data IO for project Nobody <nobody@nowhere.invalid> - 2015-11-20 05:08 +0000
        Re: Data IO for project Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-11-20 02:21 -0800
  Re: Data IO for project Ian Collins <ian-news@hotmail.com> - 2015-11-20 12:00 +1300
    Re: Data IO for project "Morten W. Petersen" <morphex@gmail.com> - 2015-11-20 01:19 +0100
    Re: Data IO for project asetofsymbols@gmail.com - 2015-11-21 12:29 -0800
      Re: Data IO for project Ian Collins <ian-news@hotmail.com> - 2015-11-22 12:13 +1300

csiph-web