René's URL Explorer Experiment


Title: Thread-safe client implementation · Issue #187 · python-smpplib/python-smpplib · GitHub

Open Graph Title: Thread-safe client implementation · Issue #187 · python-smpplib/python-smpplib

X Title: Thread-safe client implementation · Issue #187 · python-smpplib/python-smpplib

Description: Hello, I noticed that the README suggests starting a separate thread to call listen(), but I don't believe the underlying socket is thread-safe (unless I'm missing something of course). I believe I've worked out an implementation that at...

Open Graph Description: Hello, I noticed that the README suggests starting a separate thread to call listen(), but I don't believe the underlying socket is thread-safe (unless I'm missing something of course). I believe I...

X Description: Hello, I noticed that the README suggests starting a separate thread to call listen(), but I don't believe the underlying socket is thread-safe (unless I'm missing something of course). I b...

Opengraph URL: https://github.com/python-smpplib/python-smpplib/issues/187

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Thread-safe client implementation","articleBody":"Hello, I noticed that the README suggests starting a separate thread to call `listen()`, but I don't believe the underlying socket is thread-safe (unless I'm missing something of course).\r\n\r\nI believe I've worked out [an implementation](https://gist.github.com/tobiasmcnulty/af5f816fe9b801631b0b4d636fa1e6a7) that at least allows `send_message()` to avoid clobbering any enquire_link or other PDUs the socket might be exchanging at the time `send_message()` is called.\r\n\r\nWould it be worth cleaning this up and submitting a PR? If so, how would you like me to approach it? A few options I can think of:\r\n\r\n1. Include the minimal hooks necessary (if any) for someone to implement their own client outside of smpplib proper\r\n2. Update the existing client to use [the thread-safe socket implementation](https://stackoverflow.com/a/51105047/166053)\r\n3. Include an alternate `ThreadSafeClient` implementation, as in [the linked gist](https://gist.github.com/tobiasmcnulty/af5f816fe9b801631b0b4d636fa1e6a7)\r\n\r\nThanks for this library and in advance for any input you may have!","author":{"url":"https://github.com/tobiasmcnulty","@type":"Person","name":"tobiasmcnulty"},"datePublished":"2021-11-30T23:33:39.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/187/python-smpplib/issues/187"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:7c087d06-c40f-9b29-ac19-eba5866fa685
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB1D2:148D1:18A766E:22D263B:696F6766
html-safe-noncefc5239521905665f863cd5c4f14bd1ca5096bcf2854d7f462022847cc63e99c9
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMUQyOjE0OEQxOjE4QTc2NkU6MjJEMjYzQjo2OTZGNjc2NiIsInZpc2l0b3JfaWQiOiIyMDgyMzAxMTUxNjE1NjA4Njc4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac96aba9201e22973e3d08b7dc5f17c4d51199344cc4eae82dccad3416dcde18c4
hovercard-subject-tagissue:1067776688
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python-smpplib/python-smpplib/187/issue_layout
twitter:imagehttps://opengraph.githubassets.com/51ad45620e32c7b3f6f4cedadf5a737b8bedb32369fa04221ead02dfcb0a3968/python-smpplib/python-smpplib/issues/187
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/51ad45620e32c7b3f6f4cedadf5a737b8bedb32369fa04221ead02dfcb0a3968/python-smpplib/python-smpplib/issues/187
og:image:altHello, I noticed that the README suggests starting a separate thread to call listen(), but I don't believe the underlying socket is thread-safe (unless I'm missing something of course). I believe I...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernametobiasmcnulty
hostnamegithub.com
expected-hostnamegithub.com
Nonedd6be7b30d2e12704d0d9723ad4a7950f9e3ad8461efc40b5411aad62e847a89
turbo-cache-controlno-preview
go-importgithub.com/python-smpplib/python-smpplib git https://github.com/python-smpplib/python-smpplib.git
octolytics-dimension-user_id45378833
octolytics-dimension-user_loginpython-smpplib
octolytics-dimension-repository_id9441405
octolytics-dimension-repository_nwopython-smpplib/python-smpplib
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id9441405
octolytics-dimension-repository_network_root_nwopython-smpplib/python-smpplib
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release0bab932a9532ed9bc2e3e2614af9348ab39af6a7
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/python-smpplib/python-smpplib/issues/187#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-smpplib%2Fpython-smpplib%2Fissues%2F187
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-smpplib%2Fpython-smpplib%2Fissues%2F187
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python-smpplib%2Fpython-smpplib
Reloadhttps://patch-diff.githubusercontent.com/python-smpplib/python-smpplib/issues/187
Reloadhttps://patch-diff.githubusercontent.com/python-smpplib/python-smpplib/issues/187
Reloadhttps://patch-diff.githubusercontent.com/python-smpplib/python-smpplib/issues/187
python-smpplib https://patch-diff.githubusercontent.com/python-smpplib
python-smpplibhttps://patch-diff.githubusercontent.com/python-smpplib/python-smpplib
Please reload this pagehttps://patch-diff.githubusercontent.com/python-smpplib/python-smpplib/issues/187
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Fpython-smpplib%2Fpython-smpplib
Fork 143 https://patch-diff.githubusercontent.com/login?return_to=%2Fpython-smpplib%2Fpython-smpplib
Star 187 https://patch-diff.githubusercontent.com/login?return_to=%2Fpython-smpplib%2Fpython-smpplib
Code https://patch-diff.githubusercontent.com/python-smpplib/python-smpplib
Issues 20 https://patch-diff.githubusercontent.com/python-smpplib/python-smpplib/issues
Pull requests 15 https://patch-diff.githubusercontent.com/python-smpplib/python-smpplib/pulls
Discussions https://patch-diff.githubusercontent.com/python-smpplib/python-smpplib/discussions
Actions https://patch-diff.githubusercontent.com/python-smpplib/python-smpplib/actions
Security Uh oh! There was an error while loading. Please reload this page. https://patch-diff.githubusercontent.com/python-smpplib/python-smpplib/security
Please reload this pagehttps://patch-diff.githubusercontent.com/python-smpplib/python-smpplib/issues/187
Insights https://patch-diff.githubusercontent.com/python-smpplib/python-smpplib/pulse
Code https://patch-diff.githubusercontent.com/python-smpplib/python-smpplib
Issues https://patch-diff.githubusercontent.com/python-smpplib/python-smpplib/issues
Pull requests https://patch-diff.githubusercontent.com/python-smpplib/python-smpplib/pulls
Discussions https://patch-diff.githubusercontent.com/python-smpplib/python-smpplib/discussions
Actions https://patch-diff.githubusercontent.com/python-smpplib/python-smpplib/actions
Security https://patch-diff.githubusercontent.com/python-smpplib/python-smpplib/security
Insights https://patch-diff.githubusercontent.com/python-smpplib/python-smpplib/pulse
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/python-smpplib/python-smpplib/issues/187
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/python-smpplib/python-smpplib/issues/187
Thread-safe client implementationhttps://patch-diff.githubusercontent.com/python-smpplib/python-smpplib/issues/187#top
https://github.com/tobiasmcnulty
https://github.com/tobiasmcnulty
tobiasmcnultyhttps://github.com/tobiasmcnulty
on Nov 30, 2021https://github.com/python-smpplib/python-smpplib/issues/187#issue-1067776688
an implementationhttps://gist.github.com/tobiasmcnulty/af5f816fe9b801631b0b4d636fa1e6a7
the thread-safe socket implementationhttps://stackoverflow.com/a/51105047/166053
the linked gisthttps://gist.github.com/tobiasmcnulty/af5f816fe9b801631b0b4d636fa1e6a7
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.