Thanks for the reply.
> Note that dup2() can only fail with EINTR if the new fd is currently open on
> a "slow" device and the implicit close() fails due to being interrupted.
I understand the condition may be rare, but I still want to know the
correct way to handle it.
> In my experience it is
On Fri, Feb 28, 2020 at 12:41 PM wrote:
> What to do on EINTR from syscall.Dup2 (Linux)?
>
> 1) It never happen.
> 2) Retry.
> 3) Take it as irrecoverable.
> 4) Take it as success.
>
> I know this is more of an OS question, but it all started with the
> asynchronous preemption announcement, and I
(I've asked the same question already, but probably in the wrong thread,
sorry for the repost.)
What to do on EINTR from syscall.Dup2 (Linux)?
1) It never happen.
2) Retry.
3) Take it as irrecoverable.
4) Take it as success.
I know this is more of an OS question, but it all started with the
as
On Friday, 28 February 2020 21:04:04 UTC+1, Paul Hankin wrote:
>
> On Friday, 28 February 2020 20:43:16 UTC+1, Paul Hankin wrote:
>>
>> I am rather confused about modules, and have trouble making them work.
>>
>> I have a package: https://github.com/paulhankin/poker
>>
>> The go.mod looks like this
On Friday, 28 February 2020 20:43:16 UTC+1, Paul Hankin wrote:
>
> I am rather confused about modules, and have trouble making them work.
>
> I have a package: https://github.com/paulhankin/poker
>
> The go.mod looks like this: `
> module github.com/paulhankin/poker/v2
>
> go 1.13
> `
>
> The packa
I am rather confused about modules, and have trouble making them work.
I have a package: https://github.com/paulhankin/poker
The go.mod looks like this: `
module github.com/paulhankin/poker/v2
go 1.13
`
The package has a v1, and v2. At v2, I moved the main part of the package
into a subdirecto
On Fri, Feb 28, 2020 at 9:39 AM Manlio Perillo wrote:
>
> On Friday, February 28, 2020 at 6:29:56 PM UTC+1, Ian Lance Taylor wrote:
>>
>> On Fri, Feb 28, 2020 at 9:14 AM Manlio Perillo wrote:
>> >
>> > On Friday, February 28, 2020 at 5:36:09 PM UTC+1, Ian Lance Taylor wrote:
>> >>
>> >> On Fri, F
On Friday, February 28, 2020 at 6:29:56 PM UTC+1, Ian Lance Taylor wrote:
>
> On Fri, Feb 28, 2020 at 9:14 AM Manlio Perillo > wrote:
> >
> > On Friday, February 28, 2020 at 5:36:09 PM UTC+1, Ian Lance Taylor
> wrote:
> >>
> >> On Fri, Feb 28, 2020 at 8:27 AM Manlio Perillo
> wrote:
> >> >
On Fri, Feb 28, 2020 at 9:14 AM Manlio Perillo wrote:
>
> On Friday, February 28, 2020 at 5:36:09 PM UTC+1, Ian Lance Taylor wrote:
>>
>> On Fri, Feb 28, 2020 at 8:27 AM Manlio Perillo wrote:
>> >
>> > On Friday, February 28, 2020 at 4:57:00 PM UTC+1, Ian Lance Taylor wrote:
>> >>
>> >> On Fri, F
On Friday, February 28, 2020 at 5:36:09 PM UTC+1, Ian Lance Taylor wrote:
>
> On Fri, Feb 28, 2020 at 8:27 AM Manlio Perillo > wrote:
> >
> > On Friday, February 28, 2020 at 4:57:00 PM UTC+1, Ian Lance Taylor
> wrote:
> >>
> >> On Fri, Feb 28, 2020 at 7:18 AM Peter Kleiweg
> wrote:
> >> >
On Fri, Feb 28, 2020 at 8:13 AM Peter Kleiweg wrote:
>
> Op vrijdag 28 februari 2020 16:57:00 UTC+1 schreef Ian Lance Taylor:
>>
>> On Fri, Feb 28, 2020 at 7:18 AM Peter Kleiweg wrote:
>> >
>> > Op vrijdag 28 februari 2020 16:13:50 UTC+1 schreef Robert Engels:
>> >>
>> >>
>> >> Can you clarify th
On Fri, Feb 28, 2020 at 8:27 AM Manlio Perillo wrote:
>
> On Friday, February 28, 2020 at 4:57:00 PM UTC+1, Ian Lance Taylor wrote:
>>
>> On Fri, Feb 28, 2020 at 7:18 AM Peter Kleiweg wrote:
>> >
>> > Op vrijdag 28 februari 2020 16:13:50 UTC+1 schreef Robert Engels:
>> >>
>> >>
>> >> Can you clar
Contexts are great. And if your goal is to solve a specific problem, then
sometimes they may be the best solution. But you implied in your OP that
you were learning go. And in that case, I would still urge you to
understand your original channel based code, and why it does not work, and
how to
On Friday, February 28, 2020 at 4:57:00 PM UTC+1, Ian Lance Taylor wrote:
>
> On Fri, Feb 28, 2020 at 7:18 AM Peter Kleiweg > wrote:
> >
> > Op vrijdag 28 februari 2020 16:13:50 UTC+1 schreef Robert Engels:
> >>
> >>
> >> Can you clarify that a bit? Did you change the code to look for EINTR
On Fri, Feb 28, 2020 at 5:07 AM Olivia Nelson
wrote:
>
> I'm trying to use extldflags with golang:
>
> -ldflags '-extld gcc -extldflags="-headerpad 0x500" -w -s'
>
> But go link does not recognize it, it prints the help dialog
>
> # command-line-arguments
> usage: link [options] main.o
> -B note
Op vrijdag 28 februari 2020 16:57:00 UTC+1 schreef Ian Lance Taylor:
>
> On Fri, Feb 28, 2020 at 7:18 AM Peter Kleiweg > wrote:
> >
> > Op vrijdag 28 februari 2020 16:13:50 UTC+1 schreef Robert Engels:
> >>
> >>
> >> Can you clarify that a bit? Did you change the code to look for EINTR
> err
I agree that it is not a scalable architecture but unfortunately it is a large
third party application the business depends on and it cannot be rewritten.
Option 3 to use grpc is a good idea but unfortunately won’t work either because
the Go shared library invokes C function calls back into the
That does not sound like a scalable architecture!
The number of simultaneous user connections the architecture can support is
limited to the number of processes
your server can run. The resources required by a process are orders of
magnitude more than those required for a goroutine.
And the Go
On Fri, Feb 28, 2020 at 7:18 AM Peter Kleiweg wrote:
>
> Op vrijdag 28 februari 2020 16:13:50 UTC+1 schreef Robert Engels:
>>
>>
>> Can you clarify that a bit? Did you change the code to look for EINTR errors
>> and then retry the system call?
>
>
> Yes, I did. But as an option that must be enabl
The multiple instances are required to due to way the 3rd party application
works. In brief, it creates a new process for each user connection and then
each new process dynamically load the Go shared library to provide C extension
points.
--
You received this message because you are subscribed
Op vrijdag 28 februari 2020 16:13:50 UTC+1 schreef Robert Engels:
>
>
> Can you clarify that a bit? Did you change the code to look for EINTR
> errors and then retry the system call?
>
Yes, I did. But as an option that must be enabled by the user.
> -Original Message-
> From: Peter Kl
Can you clarify that a bit? Did you change the code to look for EINTR errors and then retry the system call?-Original Message-
From: Peter Kleiweg
Sent: Feb 28, 2020 9:04 AM
To: golang-nuts
Subject: [go-nuts] Re: Lot's of test errors in package zmq4 with Go version 1.14, no errors with ea
Retry after EINTR solved the code lock-up too.
Op woensdag 26 februari 2020 12:33:05 UTC+1 schreef Peter Kleiweg:
>
> With Go version 1.14 I get a lot of errors when I run:
>
> go test -v github.com/pebbe/zmq4
>
> I didn't see this with Go 1.13.8 or any earlier version.
>
> Is this a problem w
> However, due to the nature of the application, there maybe 100 or 200
instances
Interesting...
Could you elaborate the nature of the application, and why a single
instance is not enough...
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To
I have deployed a Go shared library on Linux that exposes C functions as
extension points for a 3rd party application and is loaded dynamically at
runtime. The 3rd party application then invokes "C" functions (which are
backed by Go) and that is all working as expected. However, due to the
nat
somebody beat us to it:
https://github.com/torden/go-strutil#reversestr
But for some strange reason, they seem to have made the this a method of a
StringProc class.
Perhaps they used to code in Java.
On Friday, 28 February 2020 13:07:54 UTC, Himanshu Makkar wrote:
>
> Hi
>
> I think we can creat
Hello.
I'm trying to build a shared library using `-buildmode=shared` and make a
binary link to this shared library.
The packages are:
github.com/misha-ridge/splitlib/a (-> c)
github.com/misha-ridge/splitlib/b (-> c)
github.com/misha-ridge/splitlib/c
github.com/misha-ridge/splitlib (-> a, b, c)
Hi
I think we can create a package to reverse a string and can use it whenever
needed.
reverse.go
package strutil
func Reverse(s string) string {
runes := []rune(s)
for i, j := 0, len(runes)-1; i < j; i, j = i+1, j-1 {
runes[i], runes[j] = runes[j], runes[i]
}
return s
I'm trying to use extldflags with golang:
-ldflags '-extld gcc -extldflags="-headerpad 0x500" -w -s'
But go link does not recognize it, it prints the help dialog
# command-line-arguments
usage: link [options] main.o
-B note
add an ELF NT_GNU_BUILD_ID note when using ELF
...
-ex
Rob explained this in a thread a fair while back.
> The choice was made by the output of the date command on my Unix
> machine. I should have realized the format varies with locale. Mea
> culpa. But I can still claim it's easy to remember and well
> documented.
https://groups.google.com/d/msg/gol
Each token is chosen such that it is unique in some way.
So when the parser reaches a token, it can identify it and note the order
in which they occur. This constructs the necessary knowledge we need to
parse a real value.
On Fri, Feb 28, 2020 at 10:53 AM Steve Mynott
wrote:
> I was just wonder
That's cool!
Of course we could reverse rune-slice in place, leaving a 7 liner...
func Reverse(s string) string {
r := []rune(s)
for i, j := 0, len(r) - 1; i < j; i, j = i +1 , j-1 {
r[i], r[j] = r[j], r[i]
}
return string(r)
}
On Friday, 28 February 2020 08:45:33 UTC, rog w
I was just wondering what was the significance, if any, of the magic
time layout as used by time.Parse()?
--
Steve Mynott
cv25519/ECF8B611205B447E091246AF959E3D6197190DD5
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this
On Fri, 28 Feb 2020 at 08:23, Amnon Baron Cohen wrote:
> Here is a dumb version, that wastes loads of memory.
>
> func reverse(in string) string {
>out := strings.Builder{}
>out.Grow(len(in))
>runes:= make([]rune, 0, len(in))
>
>
>for _, r := range in {
> runes = append(rune
Here is a dumb version, that wastes loads of memory.
func reverse(in string) string {
out := strings.Builder{}
out.Grow(len(in))
runes:= make([]rune, 0, len(in))
for _, r := range in {
runes = append(runes, r)
}
for i := len(runes) -1; i >= 0; i-- {
out.WriteRune(
35 matches
Mail list logo