Giter Club home page Giter Club logo

Comments (15)

jeevatkm avatar jeevatkm commented on May 14, 2024

Thanks for reporting. I will have a look.

from resty.

jeevatkm avatar jeevatkm commented on May 14, 2024

@iyidan I have analyzed it, will be available in next version. If you have PR for this, feel free to send it.

from resty.

jeevatkm avatar jeevatkm commented on May 14, 2024

@iyidan - I have taken care of it, however will do improvements later.

from resty.

jeevatkm avatar jeevatkm commented on May 14, 2024

It will be part of v0.8 release, available in master branch.

from resty.

mrd0ll4r avatar mrd0ll4r commented on May 14, 2024

Sorry to resurrect this, just to let you know: This has broken my client as resty is not parallel anymore. I knew about the data race but it was not affecting my use case. I can fix it without much issues, but please be careful in the future about changes that change the behavior of resty so much. Thanks for the library, will keep using it! :)

from resty.

jeevatkm avatar jeevatkm commented on May 14, 2024

@mrd0ll4r I'm sorry about you ran into issue.

Please let me know your suggestion to improve resty. I will think about keeping parallel and prevent data race in the mean time.

Looking forward to your inputs.

from resty.

mrd0ll4r avatar mrd0ll4r commented on May 14, 2024

Hard to say - you could use an RWMutex for the proxy settings etc, but you allow setting a proxy for an individual Request, so that's not going to work. Maybe make it so that requests with an explicit proxy use a separate transport and HTTP client? Hard to say for sure.

You could always just say "resty is not thread safe when modifying proxy settings (and maybe more), do thread safety in your code", which works fine for me.

from resty.

jeevatkm avatar jeevatkm commented on May 14, 2024

@mrd0ll4r @wanghq - I thought through it. I'm planning to remove request level proxy option and mutex locking from resty.

any objections or comment?

from resty.

mrd0ll4r avatar mrd0ll4r commented on May 14, 2024

You'd still protect the top-level proxy with an RWMutex or something, right? Sounds good to me.

from resty.

jeevatkm avatar jeevatkm commented on May 14, 2024

@mrd0ll4r that's the plan, I'm gonna give it try.

from resty.

jeevatkm avatar jeevatkm commented on May 14, 2024

@mrd0ll4r @wanghp - mutex lock is removed from resty. I have tried RWMutex however it is not needed anymore.

I need to add note for, if resty user is modifying resty client setting from multiple goroutine/dynamically they have to use their own locking mechanism.

I have pushed changes to master. resty Performance is improved.

from resty.

wanghq avatar wanghq commented on May 14, 2024

@jeevatkm , thanks for the quick response! Looks good.

from resty.

jeevatkm avatar jeevatkm commented on May 14, 2024

@wanghq have you tested master at your end. Please let me know your feedback.

from resty.

wanghq avatar wanghq commented on May 14, 2024

@jeevatkm , I didn't notice any issue with the master branch. Thanks again.

from resty.

jeevatkm avatar jeevatkm commented on May 14, 2024

@wanghq Thank you for the confirmation.

from resty.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.